Keycloak

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

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

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

15
if (outcome != success) of /subsystem=elytron/custom-realm=KeycloakSAMLRealm:read-resource
16
    /subsystem=elytron/custom-realm=KeycloakSAMLRealm:add(class-name=org.keycloak.adapters.saml.elytron.KeycloakSecurityRealm, module=org.keycloak.keycloak-saml-wildfly-elytron-adapter)
17
else
18
    echo Keycloak SAML 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=KeycloakSAMLRealm,permission-mapper=default-permission-mapper,security-event-listener=local-audit,realms=[{realm=KeycloakSAMLRealm}])
23
else
24
    echo Keycloak Security Domain already installed. Trying to install Keycloak SAML Realm.
25
    /subsystem=elytron/security-domain=KeycloakDomain:list-add(name=realms, value={realm=KeycloakSAMLRealm})
26
end-if
27

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

34
if (outcome != success) of /subsystem=elytron/service-loader-http-server-mechanism-factory=keycloak-saml-http-server-mechanism-factory:read-resource
35
    /subsystem=elytron/service-loader-http-server-mechanism-factory=keycloak-saml-http-server-mechanism-factory:add(module=org.keycloak.keycloak-saml-wildfly-elytron-adapter)
36
else
37
    echo Keycloak SAML HTTP Mechanism Factory 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-saml-http-server-mechanism-factory, global])
42
else
43
    echo Keycloak HTTP Mechanism Factory already installed. Trying to install Keycloak SAML 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-saml-http-server-mechanism-factory)
45
end-if
46

47
if (outcome != success) of /subsystem=elytron/http-authentication-factory=keycloak-http-authentication:read-resource
48
    /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-SAML,mechanism-realm-configurations=[{realm-name=KeycloakSAMLCRealm,realm-mapper=keycloak-saml-realm-mapper}]}])
49
else
50
    echo Keycloak HTTP Authentication Factory already installed. Trying to install Keycloak SAML Mechanism Configuration
51
    /subsystem=elytron/http-authentication-factory=keycloak-http-authentication:list-add(name=mechanism-configurations, value={mechanism-name=KEYCLOAK-SAML,mechanism-realm-configurations=[{realm-name=KeycloakSAMLRealm,realm-mapper=keycloak-saml-realm-mapper}]})
52
end-if
53

54
if (outcome != success) of /subsystem=undertow/application-security-domain=other:read-resource
55
    /subsystem=undertow/application-security-domain=other:add(http-authentication-factory=keycloak-http-authentication)
56
else
57
    batch
58
    /subsystem=undertow/application-security-domain=other:undefine-attribute(name=security-domain)
59
    /subsystem=undertow/application-security-domain=other:write-attribute(name=http-authentication-factory,value=keycloak-http-authentication)
60
    run-batch
61
end-if
62

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

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

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

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