Keycloak

Форк
0
/
adapter-elytron-install-offline.cli 
65 строк · 4.0 Кб
1
embed-server --server-config=${server.config:standalone.xml}
2

3
if (outcome != success) of /extension=org.keycloak.keycloak-adapter-subsystem:read-resource
4
    /extension=org.keycloak.keycloak-adapter-subsystem/:add(module=org.keycloak.keycloak-adapter-subsystem)
5
else
6
    echo Keycloak OpenID Connect Extension already installed
7
end-if
8

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

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

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

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

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

40
if (outcome != success) of /subsystem=elytron/aggregate-http-server-mechanism-factory=keycloak-http-server-mechanism-factory:read-resource
41
    /subsystem=elytron/aggregate-http-server-mechanism-factory=keycloak-http-server-mechanism-factory:add(http-server-mechanism-factories=[keycloak-oidc-http-server-mechanism-factory, global])
42
else
43
    echo Keycloak HTTP Mechanism Factory already installed. Trying to install Keycloak OpenID Connect HTTP Mechanism Factory.
44
    /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)
45
end-if
46

47

48
if (outcome != success) of /subsystem=elytron/http-authentication-factory=keycloak-http-authentication:read-resource
49
    /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}]}])
50
else
51
    echo Keycloak HTTP Authentication Factory already installed. Trying to install Keycloak OpenID Connect Mechanism Configuration
52
    /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}]})
53
end-if
54

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

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

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

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

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

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