16.3. Declarative configuration examples


You can create declarative configurations by using the following examples as a guide. Use the roxctl declarative-config lint command to verify that your configurations are valid.

16.3.1. Declarative configuration authentication provider example

Declarative configuration authentication provider example

name: A sample auth provider
minimumRole: Analyst
uiEndpoint: central.custom-domain.com:443
extraUIEndpoints:
    - central-alt.custom-domain.com:443
groups:
    - key: email
      value: example@example.com
      role: Admin
    - key: groups
      value: reviewers
      role: Analyst
requiredAttributes:
    - key: org_id
      value: "12345"
claimMappings:
    - path: org_id
      value: my_org_id
oidc:
    issuer: sample.issuer.com
    mode: auto
    clientID: CLIENT_ID
    clientSecret: CLIENT_SECRET
clientSecret: CLIENT_SECRET
iap:
    audience: audience
saml:
    spIssuer: sample.issuer.com
    metadataURL: sample.provider.com/metadata
saml:
    spIssuer: sample.issuer.com
    cert: |
    ssoURL: saml.provider.com
    idpIssuer: idp.issuer.com
userpki:
    certificateAuthorities: |
    certificate
openshift:
    enable: true

where:

minimumRole
Specifies the minimum role that will be assigned by default to any user logging in. If left blank, the value is None.
uiEndpoint
Specifies the user interface endpoint of your Central instance.
extraUIEndpoints
Specifies whether your Central instance is exposed to different endpoints.
groups
Specifies the specific roles to map users based on their attributes.
groups.key
Specifies the key that can be any claim returned from the authentication provider.
groups.role
Specifies the role that the users are given. You can use a default role or a declaratively-created role.
requiredAttributes
Specifies whether the attributes returned from the authentication provider are required, for example, if the audience is limited to a specific organization or group. This is optional.
claimMappings
Specifies whether the claims returned from the identity provider should be mapped to custom claims. This is optional.
oidc
Specifies whether the system is configured to use OpenID Connect (OIDC) as an authentication method.
oidc.issuer
Specifies the expected issuer for the token.
oidc.mode
Specifies the OIDC callback mode. Possible values are auto, post, query, and fragment. The preferred value is auto.
iap
Specifies whether the system is configured to use Google Identity-Aware Proxy (IAP) as an authentication method.
saml
Specifies whether the system is configured to use Security Assertion Markup Language (SAML) 2.0 dynamic or static configuration as an authentication method.
saml.cert
Specifies the certificate in Privacy Enhanced Mail (PEM) format.
userpki.certificateAuthorities
Specifies whether the system is configured for authentication with user certificates.
userpki.certificate
Specifies the certificate in PEM format.
openshift
Specifies whether the system is configured for OpenShift Auth authentication providers.

16.3.2. Declarative configuration short-lived token example

Declarative configuration short-lived token example

issuer: https://token.actions.githubusercontent.com
type: GITHUB_ACTION
tokenExpirationDuration: 20m
mappings:
  - key: sub
    value: repos:stackrox:stackrox
    role: Analyst

where:

issuer
Specifies the expected issuer for the token to exchange against a short-lived one.
type
Specifies the configuration type. See "Configuring short-lived access" and "Integrating RHACS using short-lived access tokens" for more information.
tokenExpirationDuration
Specifies the token lifetime in the XhYmZs format. The lifetime cannot be longer than 24 hours.
mappings
Specifies the roles to which users are mapped, based on their attributes.
mappings.key
Specifies that the key can be any claim returned from the issuer.
mappings.role
Specifies the role that the users are given. You can use a default role or a declaratively-created one.

16.3.3. Declarative configuration permission set example

Declarative configuration permission set example

name: A sample permission set
description: A sample permission set created declaratively
resources:
- resource: Integration
  access: READ_ACCESS
- resource: Administration
  access: READ_WRITE_ACCESS

where:

resources.resource
Specifies a full list of supported resources. For more information, go to Access Control Permission Sets.
resources.access
Specifies that the access can be either READ_ACCESS or READ_WRITE_ACCESS.

16.3.4. Declarative configuration access scope example

Declarative configuration access scope example

name: A sample access scope
description: A sample access scope created declaratively
rules:
    included:
        - cluster: secured-cluster-A
          namespaces:
            - namespaceA
        - cluster: secured-cluster-B
    clusterLabelSelectors:
        - requirements:
        - requirements:
          - key: kubernetes.io/metadata.name
            operator: IN
            values:
            - production
            - staging
            - environment

where:

rules.included.cluster
Specifies a cluster where only specific namespaces are included within the access scope.
rules.included.cluster
Specifies a cluster where all namespaces are included within the access scope.
rules.clusterLabelSelectors.requirements.operator
Specifies the Operator to use for the label selection. Valid values are IN, NOT_IN, EXISTS, and NOT_EXISTS.

16.3.5. Declarative configuration role example

Declarative configuration role example

name: A sample role
description: A sample role created declaratively
permissionSet: A sample permission set
accessScope: Unrestricted

where:

permissionSet
Specifies the name of the permission set; can be either one of the system permission sets or a declaratively-created permission set.
accessScope
Specifies the name of the access scope; can be either one of the system access scopes or a declaratively-created access scope.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동