Keycloak

Форк
0
/
adapter-elytron-install.cli 
63 строки · 3.9 Кб
1
if (outcome != success) of /extension=org.keycloak.keycloak-adapter-subsystem:read-resource
2
    /extension=org.keycloak.keycloak-adapter-subsystem/:add(module=org.keycloak.keycloak-adapter-subsystem)
3
else
4
    echo Keycloak OpenID Connect Extension already installed
5
end-if
6

7
if (outcome != success) of /subsystem=keycloak:read-resource
8
    /subsystem=keycloak:add
9
else
10
    echo Keycloak OpenID Connect Subsystem already installed
11
end-if
12

13
if (outcome != success) of /subsystem=elytron/custom-realm=KeycloakOIDCRealm:read-resource
14
    /subsystem=elytron/custom-realm=KeycloakOIDCRealm:add(class-name=org.keycloak.adapters.elytron.KeycloakSecurityRealm, module=org.keycloak.keycloak-wildfly-elytron-oidc-adapter)
15
else
16
    echo Keycloak OpenID Connect Realm already installed
17
end-if
18

19
if (outcome != success) of /subsystem=elytron/security-domain=KeycloakDomain:read-resource
20
    /subsystem=elytron/security-domain=KeycloakDomain:add(default-realm=KeycloakOIDCRealm,permission-mapper=default-permission-mapper,security-event-listener=local-audit,realms=[{realm=KeycloakOIDCRealm}])
21
else
22
    echo Keycloak Security Domain already installed. Trying to install Keycloak OpenID Connect Realm.
23
    /subsystem=elytron/security-domain=KeycloakDomain:list-add(name=realms, value={realm=KeycloakOIDCRealm})
24
end-if
25

26
if (outcome != success) of /subsystem=elytron/constant-realm-mapper=keycloak-oidc-realm-mapper:read-resource
27
    /subsystem=elytron/constant-realm-mapper=keycloak-oidc-realm-mapper:add(realm-name=KeycloakOIDCRealm)
28
else
29
    echo Keycloak OpenID Connect Realm Mapper already installed
30
end-if
31

32
if (outcome != success) of /subsystem=elytron/service-loader-http-server-mechanism-factory=keycloak-oidc-http-server-mechanism-factory:read-resource
33
    /subsystem=elytron/service-loader-http-server-mechanism-factory=keycloak-oidc-http-server-mechanism-factory:add(module=org.keycloak.keycloak-wildfly-elytron-oidc-adapter)
34
else
35
    echo Keycloak OpenID Connect HTTP Mechanism already installed
36
end-if
37

38
if (outcome != success) of /subsystem=elytron/aggregate-http-server-mechanism-factory=keycloak-http-server-mechanism-factory:read-resource
39
    /subsystem=elytron/aggregate-http-server-mechanism-factory=keycloak-http-server-mechanism-factory:add(http-server-mechanism-factories=[keycloak-oidc-http-server-mechanism-factory, global])
40
else
41
    echo Keycloak HTTP Mechanism Factory already installed. Trying to install Keycloak OpenID Connect HTTP Mechanism Factory.
42
    /subsystem=elytron/aggregate-http-server-mechanism-factory=keycloak-http-server-mechanism-factory:list-add(name=http-server-mechanism-factories, value=keycloak-oidc-http-server-mechanism-factory)
43
end-if
44

45

46
if (outcome != success) of /subsystem=elytron/http-authentication-factory=keycloak-http-authentication:read-resource
47
    /subsystem=elytron/http-authentication-factory=keycloak-http-authentication:add(security-domain=KeycloakDomain,http-server-mechanism-factory=keycloak-http-server-mechanism-factory,mechanism-configurations=[{mechanism-name=KEYCLOAK,mechanism-realm-configurations=[{realm-name=KeycloakOIDCRealm,realm-mapper=keycloak-oidc-realm-mapper}]}])
48
else
49
    echo Keycloak HTTP Authentication Factory already installed. Trying to install Keycloak OpenID Connect Mechanism Configuration
50
    /subsystem=elytron/http-authentication-factory=keycloak-http-authentication:list-add(name=mechanism-configurations, value={mechanism-name=KEYCLOAK,mechanism-realm-configurations=[{realm-name=KeycloakOIDCRealm,realm-mapper=keycloak-oidc-realm-mapper}]})
51
end-if
52

53
if (outcome != success) of /subsystem=undertow/application-security-domain=other:read-resource
54
    /subsystem=undertow/application-security-domain=other:add(http-authentication-factory=keycloak-http-authentication)
55
else
56
    echo Undertow already configured with Keycloak
57
end-if
58

59
if (outcome != success) of /subsystem=ejb3/application-security-domain=other:read-resource
60
    /subsystem=ejb3/application-security-domain=other:add(security-domain=KeycloakDomain)
61
else
62
    echo EJB already configured with Keycloak
63
end-if

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.