Skip to content
Last updated

access

Products:RedocRedocRevelRevelReefReefRealmRealm
Plans:ProEnterpriseEnterprise+

Configure authentication and access-related settings in a single object. The access object groups authentication and access-related configuration options together for better organization and maintainability.

New configuration format

The access object is the recommended way to configure authentication and access settings. Root-level properties (requiresLogin, residency, sso, rbac) are supported for backward compatibility but display deprecation warnings when used alongside the access object.

Options

OptionTypeDescription

access

object

Container object for access-related configuration properties.

Properties:

  • requiresLogin (boolean) - Makes all content private for non-authenticated users. Available on Pro, Enterprise, Enterprise+. See RequiresLogin configuration.
  • logoutReturnUrl (string) - URL where users are redirected after logout (new feature). Available on Pro, Enterprise, Enterprise+.
  • residency (string) - Geographical location URL for hosting your project. Available on Enterprise+. See Residency configuration.
  • sso (string | [string]) - List of identity provider types from Reunite. Available on Enterprise, Enterprise+. See SSO configuration.
  • rbac (object) - Role-based access control configuration. Available on Enterprise, Enterprise+. See RBAC configuration.

Examples

Basic access configuration

The following example configures authentication requirements and logout redirect:

redocly.yaml
access:
  requiresLogin: true
  logoutReturnUrl: https://example.com
  sso:
    - CORPORATE
    - REDOCLY

Configure logout redirect

The following example shows how to redirect users to your main website after logout:

redocly.yaml
access:
  requiresLogin: true
  logoutReturnUrl: https://yourcompany.com

Configure residency

The following example sets EU residency:

redocly.yaml
access:
  residency: https://app.cloud.eu.redocly.com
  requiresLogin: true

Configure RBAC

The following example shows how to configure role-based access control within the access object:

redocly.yaml
access:
  rbac:
    content:
      '**':
        authenticated: read

Complete access configuration

The following example shows all access-related options:

redocly.yaml
access:
  requiresLogin: true
  logoutReturnUrl: https://yourcompany.com
  residency: https://app.cloud.eu.redocly.com
  sso:
    - CORPORATE
    - GUEST
  rbac:
    content:
      '**':
        authenticated: read

Migrate from root-level properties

If you're currently using requiresLogin, residency, sso, or rbac property at the root-level, migrate to the access object format:

Old format (deprecated):

requiresLogin: true
residency: https://app.cloud.eu.redocly.com
sso:
  - CORPORATE
rbac:
  content:
    '**':
      authenticated: read

New format (recommended):

access:
  requiresLogin: true
  residency: https://app.cloud.eu.redocly.com
  sso:
    - CORPORATE
  rbac:
    content:
      '**':
        authenticated: read
Warning

Do not define the same property both at root level and in the access object. Duplicate properties result in an error.

Use only the access object format for new configurations.

Resources