From de52d5f04bee7b42fdd8b2be60349ab137e50a09 Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Wed, 27 Sep 2017 11:29:54 +0300 Subject: [PATCH] Code cleanup --- dockerfiles/init/manifests/che.env | 4 +- .../keycloak/templates/che-realm.json.erb | 122 ------------------ .../keycloak/shared/KeycloakConstants.java | 10 -- 3 files changed, 1 insertion(+), 135 deletions(-) diff --git a/dockerfiles/init/manifests/che.env b/dockerfiles/init/manifests/che.env index 4a8ded9ef0..91de37f8b0 100644 --- a/dockerfiles/init/manifests/che.env +++ b/dockerfiles/init/manifests/che.env @@ -507,9 +507,7 @@ CHE_KEYCLOAK_GITHUB_ENDPOINT=NULL CHE_KEYCLOAK_AUTH__SERVER__URL=http://172.17.0.1:5050/auth CHE_KEYCLOAK_REALM=che CHE_KEYCLOAK_CLIENT__ID=che-public -CHE_KEYCLOAK_PRIVATE_REALM=che -CHE_KEYCLOAK_PRIVATE_CLIENT__ID=che -CHE_KEYCLOAK_PRIVATE_CLIENT__SECRET=2c1b2621-d251-4701-82c4-a7dd447faa97 + ######################################################################################## ##### ##### diff --git a/dockerfiles/init/modules/keycloak/templates/che-realm.json.erb b/dockerfiles/init/modules/keycloak/templates/che-realm.json.erb index 51aece1bea..edce204450 100644 --- a/dockerfiles/init/modules/keycloak/templates/che-realm.json.erb +++ b/dockerfiles/init/modules/keycloak/templates/che-realm.json.erb @@ -39,7 +39,6 @@ "containerId" : "che" } ], "client" : { - "che" : [ ], "che-public" : [ ] } }, @@ -53,127 +52,6 @@ "otpPolicyLookAheadWindow" : 1, "otpPolicyPeriod" : 30, "clients" : [ { - "id" : "d64c54cb-dbcc-43d7-9ae4-909d1725d976", - "clientId" : "che", - "rootUrl" : "", - "surrogateAuthRequired" : false, - "enabled" : true, - "clientAuthenticatorType" : "client-secret", - "secret" : "2c1b2621-d251-4701-82c4-a7dd447faa97", - "redirectUris" : [ "*" ], - "webOrigins" : [ "*" ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : true, - "serviceAccountsEnabled" : false, - "publicClient" : false, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "saml.assertion.signature" : "false", - "saml.force.post.binding" : "false", - "saml.multivalued.roles" : "false", - "saml.encrypt" : "false", - "saml_force_name_id_format" : "false", - "saml.client.signature" : "false", - "saml.authnstatement" : "false", - "saml.server.signature" : "false", - "saml.server.signature.keyinfo.ext" : "false", - "saml.onetimeuse.condition" : "false" - }, - "fullScopeAllowed" : true, - "nodeReRegistrationTimeout" : -1, - "protocolMappers" : [ { - "id" : "f94a3cb9-7da0-441b-8dcb-7b4d091f51cb", - "name" : "full name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-full-name-mapper", - "consentRequired" : true, - "consentText" : "${fullName}", - "config" : { - "id.token.claim" : "true", - "access.token.claim" : "true", - "userinfo.token.claim" : "true" - } - }, { - "id" : "04ba17f0-fd2d-44f5-b2fc-e05439b57f86", - "name" : "role list", - "protocol" : "saml", - "protocolMapper" : "saml-role-list-mapper", - "consentRequired" : false, - "config" : { - "single" : "false", - "attribute.nameformat" : "Basic", - "attribute.name" : "Role" - } - }, { - "id" : "e029b6de-ce4b-4980-bb95-0508474220a7", - "name" : "username", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : true, - "consentText" : "${username}", - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "username", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "preferred_username", - "jsonType.label" : "String" - } - }, { - "id" : "725ecaa1-27ae-4cb2-aaed-f355e8273007", - "name" : "family name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : true, - "consentText" : "${familyName}", - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "lastName", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "family_name", - "jsonType.label" : "String" - } - }, { - "id" : "062088af-742f-47e2-a85b-6981a9a2e657", - "name" : "email", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : true, - "consentText" : "${email}", - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "email", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "email", - "jsonType.label" : "String" - } - }, { - "id" : "df30381f-b746-4d23-93f8-2e8faa34245b", - "name" : "given name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : true, - "consentText" : "${givenName}", - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "firstName", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "given_name", - "jsonType.label" : "String" - } - } ], - "useTemplateConfig" : false, - "useTemplateScope" : false, - "useTemplateMappers" : false - }, { "id" : "40162c8f-5c44-4b61-91cf-a6eac6b9e61a", "clientId" : "che-public", "surrogateAuthRequired" : false, diff --git a/multiuser/keycloak/che-multiuser-keycloak-shared/src/main/java/org/eclipse/che/multiuser/keycloak/shared/KeycloakConstants.java b/multiuser/keycloak/che-multiuser-keycloak-shared/src/main/java/org/eclipse/che/multiuser/keycloak/shared/KeycloakConstants.java index 9c1d3b662b..e113390c99 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-shared/src/main/java/org/eclipse/che/multiuser/keycloak/shared/KeycloakConstants.java +++ b/multiuser/keycloak/che-multiuser-keycloak-shared/src/main/java/org/eclipse/che/multiuser/keycloak/shared/KeycloakConstants.java @@ -14,21 +14,11 @@ package org.eclipse.che.multiuser.keycloak.shared; public class KeycloakConstants { private static final String KEYCLOAK_SETTING_PREFIX = "che.keycloak."; - private static final String PRIVATE_PREFIX = "private."; private static final String KEYCLOAK_SETTINGS_ENDPOINT_PATH = "/keycloak/settings"; public static final String AUTH_SERVER_URL_SETTING = KEYCLOAK_SETTING_PREFIX + "auth_server_url"; public static final String REALM_SETTING = KEYCLOAK_SETTING_PREFIX + "realm"; public static final String CLIENT_ID_SETTING = KEYCLOAK_SETTING_PREFIX + "client_id"; - public static final String REWRITE_RULE_SETTING = - KEYCLOAK_SETTING_PREFIX + "redirect_rewrite_rules"; - - public static final String PRIVATE_REALM_SETTING = - KEYCLOAK_SETTING_PREFIX + PRIVATE_PREFIX + "realm"; - public static final String PRIVATE_CLIENT_ID_SETTING = - KEYCLOAK_SETTING_PREFIX + PRIVATE_PREFIX + "client_id"; - public static final String PRIVATE_CLIENT_SECRET_SETTING = - KEYCLOAK_SETTING_PREFIX + PRIVATE_PREFIX + "client_secret"; public static final String OSO_ENDPOINT_SETTING = KEYCLOAK_SETTING_PREFIX + "oso.endpoint"; public static final String PROFILE_ENDPOINT_SETTING =