workin oc-auth
This commit is contained in:
78
ldap-hydra/docker-compose-2.yml
Normal file
78
ldap-hydra/docker-compose-2.yml
Normal file
@@ -0,0 +1,78 @@
|
||||
version: "3"
|
||||
services:
|
||||
hydra-client-2:
|
||||
image: oryd/hydra:v2.2.0
|
||||
container_name: hydra-client-2
|
||||
environment:
|
||||
HYDRA_ADMIN_URL: http://hydra-2:4445
|
||||
ORY_SDK_URL: http://hydra-2:4445
|
||||
command:
|
||||
- create
|
||||
- oauth2-client
|
||||
- --skip-tls-verify
|
||||
- --name
|
||||
- test-client
|
||||
- --secret
|
||||
- oc-auth-got-secret
|
||||
- --response-type
|
||||
- id_token,token,code
|
||||
- --grant-type
|
||||
- implicit,refresh_token,authorization_code,client_credentials
|
||||
- --scope
|
||||
- openid,profile,email,roles
|
||||
- --token-endpoint-auth-method
|
||||
- client_secret_post
|
||||
- --redirect-uri
|
||||
- http://localhost:3000
|
||||
|
||||
networks:
|
||||
- hydra-net
|
||||
- catalog
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: none
|
||||
depends_on:
|
||||
- hydra-2
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://hydra-2:4445"]
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
hydra-2:
|
||||
container_name: hydra-2
|
||||
image: oryd/hydra:v2.2.0
|
||||
environment:
|
||||
SECRETS_SYSTEM: oc-auth-got-secret
|
||||
LOG_LEAK_SENSITIVE_VALUES: true
|
||||
URLS_SELF_ISSUER: http://hydra-2:4444
|
||||
URLS_SELF_PUBLIC: http://hydra-2:4444
|
||||
WEBFINGER_OIDC_DISCOVERY_SUPPORTED_SCOPES: profile,email,phone,roles
|
||||
WEBFINGER_OIDC_DISCOVERY_SUPPORTED_CLAIMS: name,family_name,given_name,nickname,email,phone_number
|
||||
DSN: memory
|
||||
command: serve all --dev
|
||||
networks:
|
||||
- hydra-net
|
||||
- catalog
|
||||
ports:
|
||||
- "4446:4444"
|
||||
- "4447:4445"
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
ldap-2:
|
||||
image: pgarrett/ldap-alpine
|
||||
container_name: ldap-2
|
||||
volumes:
|
||||
- "./ldap-2.ldif:/ldif/ldap.ldif"
|
||||
networks:
|
||||
- hydra-net
|
||||
- catalog
|
||||
ports:
|
||||
- "389:389"
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
networks:
|
||||
hydra-net:
|
||||
catalog:
|
||||
external: true
|
||||
24
ldap-hydra/ldap-2.ldif
Normal file
24
ldap-hydra/ldap-2.ldif
Normal file
@@ -0,0 +1,24 @@
|
||||
dn: uid=admin2,ou=Users,dc=example,dc=com
|
||||
objectClass: inetOrgPerson
|
||||
cn: Admin2
|
||||
sn: Istrator
|
||||
uid: admin2
|
||||
userPassword: admin2
|
||||
mail: admin2@example.com
|
||||
ou: Users
|
||||
|
||||
dn: ou=AppRoles,dc=example,dc=com
|
||||
objectClass: organizationalunit
|
||||
ou: AppRoles
|
||||
description: AppRoles
|
||||
|
||||
dn: ou=App1,ou=AppRoles,dc=example,dc=com
|
||||
objectClass: organizationalunit
|
||||
ou: App1
|
||||
description: App1
|
||||
|
||||
dn: cn=traveler,ou=App1,ou=AppRoles,dc=example,dc=com
|
||||
objectClass: groupofnames
|
||||
cn: traveler
|
||||
description: traveler
|
||||
member: uid=admin2,ou=Users,dc=example,dc=com
|
||||
Reference in New Issue
Block a user