User Tools

Site Tools


сервис_keycloak

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
сервис_keycloak [2025/12/18 12:31]
val [Аутентификация пользователей WEB приложения]
сервис_keycloak [2026/02/20 13:59] (current)
val [Kubernetes]
Line 115: Line 115:
  
   * [[Сервис PostgreSQL]]   * [[Сервис PostgreSQL]]
 +  * Kubernetes [[Система Kubernetes#​Ingress]]
   * Kubernetes [[Система Kubernetes#​secrets tls]]   * Kubernetes [[Система Kubernetes#​secrets tls]]
  
 <​code>​ <​code>​
 ~/$ helm repo add bitnami https://​charts.bitnami.com/​bitnami;​ helm search repo bitnami/​keycloak --versions; helm repo remove bitnami ~/$ helm repo add bitnami https://​charts.bitnami.com/​bitnami;​ helm search repo bitnami/​keycloak --versions; helm repo remove bitnami
-...403 Forbidden+Бывает...403 Forbidden
  
 ~/$ KC_HC_VER=17.3.6 ~/$ KC_HC_VER=17.3.6
Line 134: Line 135:
   * Kubernetes [[Система Kubernetes#​Volumes]]   * Kubernetes [[Система Kubernetes#​Volumes]]
   * [[https://​www.keycloak.org/​server/​reverseproxy]]   * [[https://​www.keycloak.org/​server/​reverseproxy]]
 +
 +  * !!! Вариант со встроенным postgres может завершиться ошибкой загрузки (не удается указать bitnamilegacy),​ можно заменить на внешний,​ устанавливаемый через [[Сервис PostgreSQL#​Helm]] с указанием bitnamilegacy
  
 <​code>​ <​code>​
Line 153: Line 156:
 ingress: ingress:
   enabled: true   enabled: true
-  ​ingressClassName:​ nginx+#  ​ingressClassName:​ nginx 
 +#  ingressClassName:​ traefik
   hostname: keycloak.corpX.un   hostname: keycloak.corpX.un
 #  tls: true #  tls: true
Line 182: Line 186:
 #  password: strongpassword #  password: strongpassword
  
-##​extraVolumeMounts:​ +###​extraVolumeMounts:​ 
-##- mountPath: /​opt/​bitnami/​keycloak/​themes +###- mountPath: /​opt/​bitnami/​keycloak/​themes 
-##  name: themes +###  name: themes 
-##​extraVolumes:​ +###​extraVolumes:​ 
-##- emptyDir: {} +###- emptyDir: {} 
-##  name: themes+###  name: themes
  
 #​initContainers:​ #​initContainers:​
Line 201: Line 205:
 #  volumeMounts:​ #  volumeMounts:​
 #  - mountPath: /​opt/​bitnami/​keycloak/​themes #  - mountPath: /​opt/​bitnami/​keycloak/​themes
-##    name: themes+###    name: themes
 #    name: empty-dir #    name: empty-dir
 #    subPath: app-themes-dir #    subPath: app-themes-dir
Line 266: Line 270:
 может понадобиться включить может понадобиться включить
     Direct access grants     Direct access grants
 +    ​
 +для ограничения доступа через client-secret можно настроить:​
 +    Client authentication:​ yes
 +    Credentials  ​
 +      Client Authenticator:​ Client ID and Secret
 +      Client Secret: будет сгенерирован,​ надо скопировать вместо "​anystring"​
     ​     ​
 для передачи списка групп в токене понадобится:​ для передачи списка групп в токене понадобится:​
Line 272: Line 282:
     Configure a new mapper: Groups Membership     Configure a new mapper: Groups Membership
       Name: groups       Name: groups
 +    Configure a new mapper: Audience ​ !!! Для "​подсовывания"​ токена в .kube/​config
 +   Name (и везде):​ any-client
  
 Clients -> any-client Clients -> any-client
Line 286: Line 298:
 </​code>​ </​code>​
  
-==== Проверка ====+==== Проверка получения токена ====
  
   * [[Материалы по Windows#​Windows CA для Linux сервисов]]   * [[Материалы по Windows#​Windows CA для Linux сервисов]]
Line 312: Line 324:
 <​code>​ <​code>​
 -----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
-...+ ​...Второй сертификат...
 -----END CERTIFICATE----- -----END CERTIFICATE-----
 </​code>​ </​code>​
Line 385: Line 397:
 Bind type: simple Bind type: simple
 Bind DN: uid=admin,​cn=users,​cn=accounts,​dc=corpX,​dc=un Bind DN: uid=admin,​cn=users,​cn=accounts,​dc=corpX,​dc=un
 +Bind credentials:​ strongpassword
  
 Edit mode: READ_ONLY Edit mode: READ_ONLY
сервис_keycloak.1766050316.txt.gz · Last modified: 2025/12/18 12:31 by val