18.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.
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
- 1
- Identifies the minimum role that will be assigned by default to any user logging in. If left blank, the value is
None. - 2
- Use the user interface endpoint of your Central instance.
- 3
- If your Central instance is exposed to different endpoints, specify them here.
- 4
- These fields map users to specific roles, based on their attributes.
- 5
- The key can be any claim returned from the authentication provider.
- 6
- Identifies the role that the users are given. You can use a default role or a declaratively-created role.
- 7
- Optional: Use these fields if attributes returned from the authentication provider are required; for example, if the audience is limited to a specific organization or group.
- 8
- Optional: Use these fields if claims returned from the identity provider should be mapped to custom claims.
- 9
- This section is required only for OpenID Connect (OIDC) authentication providers.
- 10
- Identifies the expected issuer for the token.
- 11
- Identifies the OIDC callback mode. Possible values are
auto,post,query, andfragment. The preferred value isauto. - 12
- This section is required only for Google Identity-Aware Proxy (IAP) authentication providers.
- 13
- This section is required only for Security Assertion Markup Language (SAML) 2.0 dynamic configuration authentication providers.
- 14
- This section is required only for SAML 2.0 static configuration authentication providers.
- 15
- Include the certificate in Privacy Enhanced Mail (PEM) format.
- 16
- This section is required only for authentication with user certificates.
- 17
- Include the certificate in PEM format.
- 18
- This section is required only for OpenShift Auth authentication providers.
18.3.2. 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
18.3.3. 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
18.3.4. 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