apiVersion: dex.coreos.com/v1
kind: Connector
# Connector basic information
id: oidc # Connector unique identifier
name: oidc # Connector display name
type: oidc # Connector type is OIDC
metadata:
annotations:
cpaas.io/description: "11" # Connector description
name: oidc
namespace: cpaas-system
spec:
config:
# OIDC server configuration
# Configure server connection information, including server address, client credentials, and callback address
issuer: http://auth.com/auth/realms/master # OIDC server address
clientID: dex # Client ID
# Service account secret key, valid when creating Connector resources for the first time
clientSecret: xxxxxxx
redirectURI: https://example.com/dex/callback # Callback address, must match the address registered by the OIDC client
# Security configuration
# Configure SSL verification and user information acquisition method
insecureSkipVerify: true # Whether to skip SSL verification, it is recommended to set to false in a production environment
getUserInfo: false # Whether to obtain additional user information through the UserInfo endpoint
# Logout configuration
# Configure the redirect address after user logout
logoutURL: https://test.com # Logout redirect address, can be customized to the page jumped after user logout
# Scope configuration
# Configure the required authorization scope, ensure that the OIDC server supports these scopes
scopes:
- openid # Required, used for OIDC basic authentication
- profile # Optional, used to obtain user basic information
- email # Optional, used to obtain user email
# Claim mapping configuration
# Configure the mapping relationship between OIDC returned claims and platform user attributes
claimMapping:
email: email # Email mapping, used for user unique identification
groups: groups # User group mapping, used for organization structure
phone: "" # Phone mapping, optional
preferred_username: preferred_username # Username mapping, used for display name
# Custom claimextra configuration
# External custom fields will be dynamically added to the user object spec.extra field
claimExtra:
- field: xxx # Custom field name
type: string # Field type value is consistent with the definition of golang language type. For example: string, int, bool, map[string]string, []string, []int
# User group configuration
# Configure user group synchronization related parameters, ensure that the token contains group information
groupsKey: groups # Specify the key name of group information
insecureEnableGroups: false # Whether to enable group synchronization function