├── src └── main │ ├── resources │ ├── META-INF │ │ ├── services │ │ │ ├── org.keycloak.common.util.ResteasyProvider │ │ │ ├── org.keycloak.config.ConfigProviderFactory │ │ │ └── org.keycloak.platform.PlatformProvider │ │ ├── keycloak-themes.json │ │ ├── additional-spring-configuration-metadata.json │ │ └── keycloak-server.json │ ├── theme │ │ ├── providers-only │ │ │ └── login │ │ │ │ ├── resources │ │ │ │ ├── img │ │ │ │ │ ├── keycloak-bg.png │ │ │ │ │ ├── keycloak-logo.png │ │ │ │ │ ├── feedback-error-sign.png │ │ │ │ │ ├── keycloak-logo-text.png │ │ │ │ │ ├── feedback-success-sign.png │ │ │ │ │ ├── feedback-warning-sign.png │ │ │ │ │ ├── feedback-error-arrow-down.png │ │ │ │ │ ├── feedback-success-arrow-down.png │ │ │ │ │ └── feedback-warning-arrow-down.png │ │ │ │ └── css │ │ │ │ │ └── login.css │ │ │ │ ├── login.ftl │ │ │ │ └── theme.properties │ │ └── README.md │ └── application.yml │ └── java │ └── com │ └── suchorski │ └── server │ ├── keycloak │ ├── ServerProperties.java │ ├── providers │ │ ├── JsonProviderFactory.java │ │ └── SimplePlatformProvider.java │ ├── App.java │ ├── RequestFilter.java │ └── Config.java │ ├── SpringbootKeycloakServerApplication.java │ ├── controllers │ └── MainController.java │ └── resteasy │ └── Resteasy4Provider.java ├── .mvn └── wrapper │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── .gitignore ├── .github └── FUNDING.yml ├── README.md ├── nbactions.xml ├── pom.xml ├── mvnw.cmd ├── mvnw └── LICENSE /src/main/resources/META-INF/services/org.keycloak.common.util.ResteasyProvider: -------------------------------------------------------------------------------- 1 | com.suchorski.server.resteasy.Resteasy4Provider -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchorski/springboot-keycloak-server/HEAD/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /src/main/resources/META-INF/services/org.keycloak.config.ConfigProviderFactory: -------------------------------------------------------------------------------- 1 | com.suchorski.server.keycloak.providers.JsonProviderFactory -------------------------------------------------------------------------------- /src/main/resources/META-INF/services/org.keycloak.platform.PlatformProvider: -------------------------------------------------------------------------------- 1 | com.suchorski.server.keycloak.providers.SimplePlatformProvider -------------------------------------------------------------------------------- /src/main/resources/META-INF/keycloak-themes.json: -------------------------------------------------------------------------------- 1 | { 2 | "themes": [ 3 | { 4 | "name": "providers-only", 5 | "types": [ 6 | "login" 7 | ] 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /src/main/resources/theme/providers-only/login/resources/img/keycloak-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchorski/springboot-keycloak-server/HEAD/src/main/resources/theme/providers-only/login/resources/img/keycloak-bg.png -------------------------------------------------------------------------------- /src/main/resources/theme/providers-only/login/resources/img/keycloak-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchorski/springboot-keycloak-server/HEAD/src/main/resources/theme/providers-only/login/resources/img/keycloak-logo.png -------------------------------------------------------------------------------- /src/main/resources/theme/providers-only/login/resources/img/feedback-error-sign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchorski/springboot-keycloak-server/HEAD/src/main/resources/theme/providers-only/login/resources/img/feedback-error-sign.png -------------------------------------------------------------------------------- /src/main/resources/theme/providers-only/login/resources/img/keycloak-logo-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchorski/springboot-keycloak-server/HEAD/src/main/resources/theme/providers-only/login/resources/img/keycloak-logo-text.png -------------------------------------------------------------------------------- /src/main/resources/theme/providers-only/login/resources/img/feedback-success-sign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchorski/springboot-keycloak-server/HEAD/src/main/resources/theme/providers-only/login/resources/img/feedback-success-sign.png -------------------------------------------------------------------------------- /src/main/resources/theme/providers-only/login/resources/img/feedback-warning-sign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchorski/springboot-keycloak-server/HEAD/src/main/resources/theme/providers-only/login/resources/img/feedback-warning-sign.png -------------------------------------------------------------------------------- /src/main/resources/theme/providers-only/login/resources/img/feedback-error-arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchorski/springboot-keycloak-server/HEAD/src/main/resources/theme/providers-only/login/resources/img/feedback-error-arrow-down.png -------------------------------------------------------------------------------- /src/main/resources/theme/providers-only/login/resources/img/feedback-success-arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchorski/springboot-keycloak-server/HEAD/src/main/resources/theme/providers-only/login/resources/img/feedback-success-arrow-down.png -------------------------------------------------------------------------------- /src/main/resources/theme/providers-only/login/resources/img/feedback-warning-arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchorski/springboot-keycloak-server/HEAD/src/main/resources/theme/providers-only/login/resources/img/feedback-warning-arrow-down.png -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar 3 | -------------------------------------------------------------------------------- /src/main/java/com/suchorski/server/keycloak/ServerProperties.java: -------------------------------------------------------------------------------- 1 | package com.suchorski.server.keycloak; 2 | 3 | import org.springframework.boot.context.properties.ConfigurationProperties; 4 | 5 | @ConfigurationProperties(prefix = "keycloak.server") 6 | public record ServerProperties(String contextPath, String username, String password) {} 7 | -------------------------------------------------------------------------------- /src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | jpa: 3 | defer-datasource-initialization: true 4 | properties: 5 | hibernate: 6 | transaction: 7 | jta: 8 | platform: org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform 9 | datasource: 10 | username: sa 11 | url: jdbc:h2:file:./keycloak;DB_CLOSE_ON_EXIT=FALSE 12 | 13 | keycloak: 14 | server: 15 | context-path: /auth 16 | username: admin 17 | password: admin 18 | context-redirect: true 19 | 20 | logging: 21 | level: 22 | root: ERROR -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | 35 | ### H2 database ## 36 | *.db -------------------------------------------------------------------------------- /src/main/resources/META-INF/additional-spring-configuration-metadata.json: -------------------------------------------------------------------------------- 1 | {"properties": [ 2 | { 3 | "name": "keycloak.server.context-path", 4 | "type": "java.lang.String", 5 | "description": "Context path for Keycloak's server" 6 | }, 7 | { 8 | "name": "keycloak.server.username", 9 | "type": "java.lang.String", 10 | "description": "Master administrator user name" 11 | }, 12 | { 13 | "name": "keycloak.server.password", 14 | "type": "java.lang.String", 15 | "description": "Master administrator password" 16 | }, 17 | { 18 | "name": "keycloak.server.context-redirect", 19 | "type": "java.lang.String", 20 | "description": "Defines if the / redirects or not to /context'" 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /src/main/java/com/suchorski/server/SpringbootKeycloakServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.suchorski.server; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration; 6 | import org.springframework.boot.context.properties.EnableConfigurationProperties; 7 | 8 | import com.suchorski.server.keycloak.ServerProperties; 9 | 10 | @SpringBootApplication(exclude = LiquibaseAutoConfiguration.class) 11 | @EnableConfigurationProperties(ServerProperties.class) 12 | public class SpringbootKeycloakServerApplication { 13 | 14 | public static void main(String[] args) { 15 | SpringApplication.run(SpringbootKeycloakServerApplication.class, args); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/suchorski/server/controllers/MainController.java: -------------------------------------------------------------------------------- 1 | package com.suchorski.server.controllers; 2 | 3 | import org.springframework.beans.factory.annotation.Value; 4 | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | import org.springframework.web.servlet.view.RedirectView; 8 | 9 | @ConditionalOnProperty(prefix = "keycloak.server", name = "context-redirect", havingValue = "true") 10 | @RestController 11 | public class MainController { 12 | 13 | @Value("${keycloak.server.context-path}") 14 | private String contextPath; 15 | 16 | @GetMapping 17 | public RedirectView root() { 18 | return new RedirectView(contextPath); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [suchorski] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: suchorski 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: suchorski 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /src/main/java/com/suchorski/server/resteasy/Resteasy4Provider.java: -------------------------------------------------------------------------------- 1 | package com.suchorski.server.resteasy; 2 | 3 | import org.jboss.resteasy.core.ResteasyContext; 4 | import org.jboss.resteasy.spi.ResteasyProviderFactory; 5 | import org.keycloak.common.util.ResteasyProvider; 6 | 7 | @SuppressWarnings({ 8 | "unchecked", "rawtypes" 9 | }) 10 | public class Resteasy4Provider implements ResteasyProvider { 11 | 12 | @Override 13 | public R getContextData(Class type) { 14 | return ResteasyProviderFactory.getInstance().getContextData(type); 15 | } 16 | 17 | @Override 18 | public void pushDefaultContextObject(Class type, Object instance) { 19 | ResteasyProviderFactory.getInstance() 20 | .getContextData(org.jboss.resteasy.spi.Dispatcher.class) 21 | .getDefaultContextObjects() 22 | .put(type, instance); 23 | } 24 | 25 | @Override 26 | public void pushContext(Class type, Object instance) { 27 | ResteasyContext.pushContext(type, instance); 28 | } 29 | 30 | @Override 31 | public void clearContextData() { 32 | ResteasyContext.clearContextData(); 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /src/main/resources/theme/README.md: -------------------------------------------------------------------------------- 1 | Creating Themes 2 | =============== 3 | 4 | Themes are used to configure the look and feel of login pages and the account management console. 5 | 6 | Custom themes packaged in a JAR file should be deployed to the `${kc.home.dir}/providers` directory. After that, run 7 | the `build` command to install them before starting the server. 8 | 9 | You are also able to create your custom themes in this directory, directly. Themes within this directory do not require 10 | the `build` command to be installed. 11 | 12 | When running the server in development mode using `start-dev`, themes are not cached so that you can easily work on them without a need to restart 13 | the server when making changes. 14 | 15 | See the theme section in the [Server Developer Guide](https://www.keycloak.org/docs/latest/server_development/#_themes) for more details about how to create custom themes. 16 | 17 | Overriding the built-in templates 18 | --------------------------------- 19 | 20 | While creating custom themes, especially when overriding templates, it may be useful to use the built-in templates as 21 | a reference. These can be found within the theme directory of `../lib/lib/main/org.keycloak.keycloak-themes-20.0.0.jar`, which can be opened using any 22 | standard ZIP archive tool. 23 | 24 | **Built-in themes should not be modified directly, instead a custom theme should be created.** -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Keycloak Server Embedded in a Spring Boot Application 2 | 3 | This project provies an embedded [Keycloak](https://www.keycloak.org) server running on a [Spring Boot](https://spring.io/projects/spring-boot) application. 4 | 5 | _Based on this post from [Baeldung](https://www.baeldung.com/keycloak-embedded-in-spring-boot-app)._ 6 | 7 | ## Features 8 | 9 | - Fully standalone Keycloak server running on embedded Tomcat; 10 | - Added a custom theme with providers only login screen. 11 | 12 | ## Compatibility 13 | 14 | | Version | Java | Keycloak | Spring Boot | RESTEasy | Infinispan | Liquibase | 15 | | - | - | - | - | - | - | - | 16 | | 4.0.0 | 17 | 22.0.5 | 3.1.5 | 6.2.4.Final | 14.0.19.Final | 4.23.2 | 17 | | 5.0.0 | 17 | 23.0.3 | 3.2.0 | 6.2.4.Final | 14.0.21.Final | 4.23.2 | 18 | | 5.0.1 | 17 | 23.0.4 | 3.2.1 | 6.2.4.Final | 14.0.21.Final | 4.23.2 | 19 | 20 | * Removed older versions from compatibility table keeping last 2 major version. For olders, check the [tags](https://github.com/suchorski/springboot-keycloak-server/tags) section. 21 | 22 | ## Configurations 23 | 24 | You can customize the server by changing the `application.yml` file inside `resources` folder. 25 | 26 | ## Building 27 | 28 | You can clone this repo and build it using the [Maven](https://maven.apache.org/). 29 | 30 | ```bash 31 | $ git clone https://github.com/suchorski/springboot-keycloak-server 32 | $ cd springboot-keycloak-server 33 | $ mvn package 34 | $ java -jar target/server-5.0.1.jar 35 | ``` 36 | 37 | # Contribution 38 | 39 | Feel free to contribute with us. 40 | -------------------------------------------------------------------------------- /src/main/java/com/suchorski/server/keycloak/providers/JsonProviderFactory.java: -------------------------------------------------------------------------------- 1 | package com.suchorski.server.keycloak.providers; 2 | 3 | import java.io.IOException; 4 | import java.util.HashMap; 5 | import java.util.Map; 6 | import java.util.Properties; 7 | 8 | import jakarta.servlet.ServletContext; 9 | 10 | import org.keycloak.common.util.Resteasy; 11 | import org.keycloak.common.util.SystemEnvProperties; 12 | import org.keycloak.services.util.JsonConfigProviderFactory; 13 | import org.keycloak.util.JsonSerialization; 14 | 15 | public class JsonProviderFactory extends JsonConfigProviderFactory { 16 | 17 | public static final String SERVER_CONTEXT_CONFIG_PROPERTY_OVERRIDES = "keycloak.server.context.config.property-overrides"; 18 | 19 | @Override 20 | protected Properties getProperties() { 21 | return new SystemEnvProperties(getPropertyOverrides()); 22 | } 23 | 24 | private Map getPropertyOverrides() { 25 | final var context = Resteasy.getContextData(ServletContext.class); 26 | final var propertyOverridesMap = new HashMap(); 27 | final var propertyOverrides = context.getInitParameter(SERVER_CONTEXT_CONFIG_PROPERTY_OVERRIDES); 28 | try { 29 | if (context.getInitParameter(SERVER_CONTEXT_CONFIG_PROPERTY_OVERRIDES) != null) { 30 | final var jsonObj = JsonSerialization.mapper.readTree(propertyOverrides); 31 | jsonObj.fields().forEachRemaining(e -> propertyOverridesMap.put(e.getKey(), e.getValue().asText())); 32 | } 33 | } catch (IOException e) { 34 | } 35 | return propertyOverridesMap; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/resources/theme/providers-only/login/login.ftl: -------------------------------------------------------------------------------- 1 | <#import "template.ftl" as layout> 2 | <@layout.registrationLayout displayMessage=!messagesPerField.existsError('username','password') displayInfo=realm.password && realm.registrationAllowed && !registrationDisabled??; section> 3 | <#if section = "header"> 4 | ${msg("loginAccountTitle")} 5 | <#elseif section = "socialProviders" > 6 | <#if realm.password && social.providers??> 7 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/java/com/suchorski/server/keycloak/App.java: -------------------------------------------------------------------------------- 1 | package com.suchorski.server.keycloak; 2 | 3 | import java.util.NoSuchElementException; 4 | 5 | import org.keycloak.Config; 6 | import org.keycloak.exportimport.ExportImportManager; 7 | import org.keycloak.models.KeycloakSession; 8 | import org.keycloak.services.managers.ApplianceBootstrap; 9 | import org.keycloak.services.resources.KeycloakApplication; 10 | import org.keycloak.services.util.JsonConfigProviderFactory; 11 | 12 | import com.suchorski.server.keycloak.providers.JsonProviderFactory; 13 | import jakarta.ws.rs.ApplicationPath; 14 | 15 | import lombok.extern.slf4j.Slf4j; 16 | 17 | @Slf4j 18 | @ApplicationPath("/") 19 | public class App extends KeycloakApplication { 20 | 21 | static ServerProperties properties; 22 | 23 | @Override 24 | protected void loadConfig() { 25 | JsonConfigProviderFactory factory = new JsonProviderFactory(); 26 | Config.init(factory.create().orElseThrow(() -> new NoSuchElementException("No value present"))); 27 | } 28 | 29 | @Override 30 | protected ExportImportManager bootstrap() { 31 | final ExportImportManager exportImportManager = super.bootstrap(); 32 | createMasterRealmAdminUser(); 33 | return exportImportManager; 34 | } 35 | 36 | private void createMasterRealmAdminUser() { 37 | try (KeycloakSession session = getSessionFactory().create()) { 38 | ApplianceBootstrap applianceBootstrap = new ApplianceBootstrap(session); 39 | try { 40 | session.getTransactionManager().begin(); 41 | applianceBootstrap.createMasterRealmUser(properties.username(), properties.password()); 42 | session.getTransactionManager().commit(); 43 | } catch (Exception ex) { 44 | log.warn("Couldn't create keycloak master admin user: {}", ex.getMessage()); 45 | session.getTransactionManager().rollback(); 46 | } 47 | } 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/suchorski/server/keycloak/RequestFilter.java: -------------------------------------------------------------------------------- 1 | package com.suchorski.server.keycloak; 2 | 3 | import java.io.UnsupportedEncodingException; 4 | import java.nio.charset.StandardCharsets; 5 | 6 | import jakarta.servlet.Filter; 7 | import jakarta.servlet.FilterChain; 8 | import jakarta.servlet.ServletRequest; 9 | import jakarta.servlet.ServletResponse; 10 | import jakarta.servlet.http.HttpServletRequest; 11 | 12 | import org.keycloak.common.ClientConnection; 13 | import org.keycloak.services.filters.AbstractRequestFilter; 14 | 15 | public class RequestFilter extends AbstractRequestFilter implements Filter { 16 | 17 | @Override 18 | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) 19 | throws UnsupportedEncodingException { 20 | servletRequest.setCharacterEncoding(StandardCharsets.UTF_8.name()); 21 | final var clientConnection = createConnection((HttpServletRequest) servletRequest); 22 | filter(clientConnection, (session) -> { 23 | try { 24 | filterChain.doFilter(servletRequest, servletResponse); 25 | } catch (Exception e) { 26 | throw new RuntimeException(e); 27 | } 28 | }); 29 | } 30 | 31 | private ClientConnection createConnection(HttpServletRequest request) { 32 | return new ClientConnection() { 33 | @Override 34 | public String getRemoteAddr() { 35 | return request.getRemoteAddr(); 36 | } 37 | 38 | @Override 39 | public String getRemoteHost() { 40 | return request.getRemoteHost(); 41 | } 42 | 43 | @Override 44 | public int getRemotePort() { 45 | return request.getRemotePort(); 46 | } 47 | 48 | @Override 49 | public String getLocalAddr() { 50 | return request.getLocalAddr(); 51 | } 52 | 53 | @Override 54 | public int getLocalPort() { 55 | return request.getLocalPort(); 56 | } 57 | }; 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /src/main/java/com/suchorski/server/keycloak/providers/SimplePlatformProvider.java: -------------------------------------------------------------------------------- 1 | package com.suchorski.server.keycloak.providers; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.nio.file.Files; 6 | 7 | import org.keycloak.Config.Scope; 8 | import org.keycloak.common.Profile; 9 | import org.keycloak.common.profile.PropertiesFileProfileConfigResolver; 10 | import org.keycloak.common.profile.PropertiesProfileConfigResolver; 11 | import org.keycloak.platform.PlatformProvider; 12 | 13 | import lombok.extern.slf4j.Slf4j; 14 | 15 | @Slf4j 16 | public class SimplePlatformProvider implements PlatformProvider { 17 | 18 | private File tmpDir; 19 | 20 | public SimplePlatformProvider() { 21 | Profile.configure( 22 | new PropertiesProfileConfigResolver(System.getProperties()), 23 | new PropertiesFileProfileConfigResolver()); 24 | } 25 | 26 | @Override 27 | public String name() { 28 | return "springboot-keycloak-server"; 29 | } 30 | 31 | @Override 32 | public void onStartup(Runnable startupHook) { 33 | startupHook.run(); 34 | } 35 | 36 | @Override 37 | public void onShutdown(Runnable shutdownHook) { 38 | } 39 | 40 | @Override 41 | public void exit(Throwable cause) { 42 | throw new RuntimeException(cause); 43 | } 44 | 45 | @Override 46 | public File getTmpDirectory() { 47 | if (tmpDir == null) { 48 | final var projectBuildDir = System.getProperty("project.build.directory"); 49 | File tmpDir; 50 | if (projectBuildDir != null) { 51 | tmpDir = new File(projectBuildDir, "server-tmp"); 52 | tmpDir.mkdir(); 53 | } else { 54 | try { 55 | tmpDir = Files.createTempDirectory("keycloak-server-").toFile(); 56 | tmpDir.deleteOnExit(); 57 | } catch (IOException ioe) { 58 | throw new RuntimeException("Could not create temporary directory", ioe); 59 | } 60 | } 61 | if (tmpDir.isDirectory()) { 62 | this.tmpDir = tmpDir; 63 | log.info("Using server tmp directory: {}", tmpDir.getAbsolutePath()); 64 | } else { 65 | throw new RuntimeException("Directory " + tmpDir + " was not created and does not exists"); 66 | } 67 | } 68 | return tmpDir; 69 | } 70 | 71 | @Override 72 | public ClassLoader getScriptEngineClassLoader(Scope scriptProviderConfig) { 73 | return null; 74 | } 75 | 76 | } -------------------------------------------------------------------------------- /nbactions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | run 5 | 6 | jar 7 | 8 | 9 | process-classes 10 | org.codehaus.mojo:exec-maven-plugin:3.1.0:exec 11 | 12 | 13 | 14 | ${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs} 15 | 16 | com.suchorski.server.SpringbootKeycloakServerApplication 17 | java 18 | 19 | 20 | 21 | debug 22 | 23 | jar 24 | 25 | 26 | process-classes 27 | org.codehaus.mojo:exec-maven-plugin:3.1.0:exec 28 | 29 | 30 | -agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} 31 | ${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs} 32 | 33 | com.suchorski.server.SpringbootKeycloakServerApplication 34 | java 35 | true 36 | 37 | 38 | 39 | profile 40 | 41 | jar 42 | 43 | 44 | process-classes 45 | org.codehaus.mojo:exec-maven-plugin:3.1.0:exec 46 | 47 | 48 | 49 | ${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs} 50 | com.suchorski.server.SpringbootKeycloakServerApplication 51 | java 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/main/java/com/suchorski/server/keycloak/Config.java: -------------------------------------------------------------------------------- 1 | package com.suchorski.server.keycloak; 2 | 3 | import java.util.concurrent.ExecutorService; 4 | import java.util.concurrent.Executors; 5 | 6 | import javax.naming.CompositeName; 7 | import javax.naming.InitialContext; 8 | import javax.naming.Name; 9 | import javax.naming.NameParser; 10 | import javax.naming.NamingException; 11 | import javax.naming.spi.NamingManager; 12 | import javax.sql.DataSource; 13 | 14 | import org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher; 15 | import org.jboss.resteasy.plugins.server.servlet.ResteasyContextParameters; 16 | import org.keycloak.platform.Platform; 17 | import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; 18 | import org.springframework.boot.web.servlet.FilterRegistrationBean; 19 | import org.springframework.boot.web.servlet.ServletRegistrationBean; 20 | import org.springframework.context.annotation.Bean; 21 | import org.springframework.context.annotation.Configuration; 22 | 23 | import com.suchorski.server.keycloak.providers.SimplePlatformProvider; 24 | import java.util.logging.Level; 25 | import java.util.logging.Logger; 26 | 27 | import lombok.RequiredArgsConstructor; 28 | 29 | @Configuration 30 | @RequiredArgsConstructor 31 | public class Config { 32 | 33 | private final ServerProperties properties; 34 | private final DataSource dataSource; 35 | 36 | @Bean 37 | @ConditionalOnMissingBean(name = "springBootPlatform") 38 | protected SimplePlatformProvider springBootPlatform() { 39 | return (SimplePlatformProvider) Platform.getPlatform(); 40 | } 41 | 42 | @Bean 43 | ServletRegistrationBean keycloakJaxRsApplication() { 44 | try { 45 | mockJndiEnvironment(); 46 | } catch (NamingException ex) { 47 | Logger.getLogger(Config.class.getName()).log(Level.SEVERE, null, ex); 48 | } 49 | App.properties = properties; 50 | final var servlet = new ServletRegistrationBean(new HttpServlet30Dispatcher()); 51 | servlet.addInitParameter("jakarta.ws.rs.Application", App.class.getName()); 52 | servlet.addInitParameter(ResteasyContextParameters.RESTEASY_SERVLET_MAPPING_PREFIX, properties.contextPath()); 53 | servlet.addInitParameter(ResteasyContextParameters.RESTEASY_USE_CONTAINER_FORM_PARAMS, "true"); 54 | servlet.addUrlMappings(properties.contextPath() + "/*"); 55 | servlet.setLoadOnStartup(2); 56 | servlet.setAsyncSupported(true); 57 | return servlet; 58 | } 59 | 60 | @Bean 61 | FilterRegistrationBean keycloakSessionManagement() { 62 | final var filter = new FilterRegistrationBean(); 63 | filter.setName("Keycloak Session Management"); 64 | filter.setFilter(new RequestFilter()); 65 | filter.addUrlPatterns(properties.contextPath() + "/*"); 66 | return filter; 67 | } 68 | 69 | private void mockJndiEnvironment() throws NamingException { 70 | NamingManager.setInitialContextFactoryBuilder((env) -> (environment) -> new InitialContext() { 71 | @Override 72 | public Object lookup(Name name) { 73 | return lookup(name.toString()); 74 | } 75 | 76 | @Override 77 | public Object lookup(String name) { 78 | if ("spring/datasource".equals(name)) { 79 | return dataSource; 80 | } else if (name.startsWith("java:jboss/ee/concurrency/executor/")) { 81 | return fixedThreadPool(); 82 | } 83 | return null; 84 | } 85 | 86 | @Override 87 | public NameParser getNameParser(String name) { 88 | return CompositeName::new; 89 | } 90 | 91 | @Override 92 | public void close() { 93 | } 94 | }); 95 | } 96 | 97 | @Bean("fixedThreadPool") 98 | ExecutorService fixedThreadPool() { 99 | return Executors.newFixedThreadPool(5); 100 | } 101 | 102 | } 103 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | org.springframework.boot 8 | spring-boot-starter-parent 9 | 3.2.1 10 | 11 | 12 | com.suchorski 13 | server 14 | 5.0.1 15 | springboot-keycloak-server 16 | Embeded Keycloak on Spring Boot Server 17 | 18 | 17 19 | 23.0.4 20 | 14.0.21.Final 21 | 6.2.4.Final 22 | 1.10.3 23 | 4.23.2 24 | 2.6 25 | 2.2.224 26 | 6.2.7.Final 27 | 6.2.7.Final 28 | 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-starter-web 33 | 34 | 35 | org.springframework.boot 36 | spring-boot-starter-data-jpa 37 | 38 | 39 | org.hibernate 40 | hibernate-core 41 | 42 | 43 | 44 | 45 | com.h2database 46 | h2 47 | ${h2.version} 48 | runtime 49 | 50 | 51 | org.hibernate 52 | hibernate-core 53 | ${hibernate.c3p0.version} 54 | 55 | 56 | org.hibernate.orm 57 | hibernate-c3p0 58 | ${hibernate.c3p0.version} 59 | test 60 | 61 | 62 | io.micrometer 63 | micrometer-registry-prometheus 64 | 65 | 66 | 67 | org.projectlombok 68 | lombok 69 | true 70 | 71 | 72 | 73 | org.jboss.resteasy 74 | resteasy-servlet-initializer 75 | ${resteasy.version} 76 | 77 | 78 | org.jboss.resteasy 79 | resteasy-client 80 | ${resteasy.version} 81 | 82 | 83 | org.jboss.resteasy 84 | resteasy-jackson2-provider 85 | ${resteasy.version} 86 | 87 | 88 | org.keycloak 89 | keycloak-dependencies-server-all 90 | ${keycloak.version} 91 | pom 92 | 93 | 94 | org.slf4j 95 | slf4j-log4j12 96 | 97 | 98 | log4j 99 | log4j 100 | 101 | 102 | 103 | 104 | org.springframework.boot 105 | spring-boot-configuration-processor 106 | true 107 | 108 | 109 | org.keycloak 110 | keycloak-crypto-default 111 | ${keycloak.version} 112 | 113 | 114 | org.keycloak 115 | keycloak-admin-ui 116 | ${keycloak.version} 117 | 118 | 119 | * 120 | * 121 | 122 | 123 | 124 | 125 | org.keycloak 126 | keycloak-rest-admin-ui-ext 127 | ${keycloak.version} 128 | 129 | 130 | org.liquibase 131 | liquibase-core 132 | 133 | 134 | org.yaml 135 | snakeyaml 136 | 137 | 138 | org.apache.commons 139 | commons-text 140 | 141 | 142 | 143 | 144 | org.snakeyaml 145 | snakeyaml-engine 146 | ${org.snakeyaml.snakeyaml-engine.version} 147 | 148 | 149 | 150 | 151 | 152 | 153 | org.springframework.boot 154 | spring-boot-maven-plugin 155 | 156 | 157 | 158 | org.projectlombok 159 | lombok 160 | 161 | 162 | 163 | 164 | org.keycloak 165 | keycloak-connections-jpa 166 | 167 | 168 | org.keycloak 169 | keycloak-model-jpa 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | suchorski 180 | Thiago Suchorski 181 | thiago@suchorski.com 182 | https://www.suchorski.com 183 | America/Sao_Paulo 184 | 185 | 186 | 187 | 188 | -------------------------------------------------------------------------------- /src/main/resources/theme/providers-only/login/theme.properties: -------------------------------------------------------------------------------- 1 | parent=base 2 | import=common/keycloak 3 | 4 | styles=css/login.css 5 | stylesCommon=web_modules/@patternfly/react-core/dist/styles/base.css web_modules/@patternfly/react-core/dist/styles/app.css node_modules/patternfly/dist/css/patternfly.min.css node_modules/patternfly/dist/css/patternfly-additions.min.css lib/pficon/pficon.css 6 | 7 | meta=viewport==width=device-width,initial-scale=1 8 | 9 | kcHtmlClass=login-pf 10 | kcLoginClass=login-pf-page 11 | 12 | kcLogoLink=http://www.keycloak.org 13 | 14 | kcLogoClass=login-pf-brand 15 | 16 | kcContainerClass=container-fluid 17 | kcContentClass=col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3 col-lg-6 col-lg-offset-3 18 | 19 | kcHeaderClass=login-pf-page-header 20 | kcFeedbackAreaClass=col-md-12 21 | kcLocaleClass=col-xs-12 col-sm-1 22 | 23 | ## Locale 24 | kcLocaleMainClass=pf-c-dropdown 25 | kcLocaleListClass=pf-c-dropdown__menu pf-m-align-right 26 | kcLocaleItemClass=pf-c-dropdown__menu-item 27 | 28 | ## Alert 29 | kcAlertClass=pf-c-alert pf-m-inline 30 | kcAlertTitleClass=pf-c-alert__title kc-feedback-text 31 | 32 | kcFormAreaClass=col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-8 col-lg-offset-2 33 | kcFormCardClass=card-pf 34 | 35 | ### Social providers 36 | kcFormSocialAccountListClass=pf-c-login__main-footer-links kc-social-links 37 | kcFormSocialAccountListGridClass=pf-l-grid kc-social-grid 38 | kcFormSocialAccountListButtonClass=pf-c-button pf-m-control pf-m-block kc-social-item kc-social-gray 39 | kcFormSocialAccountGridItem=pf-l-grid__item 40 | 41 | kcFormSocialAccountNameClass=kc-social-provider-name 42 | kcFormSocialAccountLinkClass=pf-c-login__main-footer-links-item-link 43 | kcFormSocialAccountSectionClass=kc-social-section kc-social-gray 44 | kcFormHeaderClass=login-pf-header 45 | 46 | kcFeedbackErrorIcon=fa fa-fw fa-exclamation-circle 47 | kcFeedbackWarningIcon=fa fa-fw fa-exclamation-triangle 48 | kcFeedbackSuccessIcon=fa fa-fw fa-check-circle 49 | kcFeedbackInfoIcon=fa fa-fw fa-info-circle 50 | 51 | kcResetFlowIcon=pficon pficon-arrow fa 52 | 53 | # WebAuthn icons 54 | kcWebAuthnKeyIcon=pficon pficon-key 55 | kcWebAuthnDefaultIcon=pficon pficon-key 56 | kcWebAuthnUnknownIcon=pficon pficon-key unknown-transport-class 57 | kcWebAuthnUSB=fa fa-usb 58 | kcWebAuthnNFC=fa fa-wifi 59 | kcWebAuthnBLE=fa fa-bluetooth-b 60 | kcWebAuthnInternal=pficon pficon-key 61 | 62 | kcFormClass=form-horizontal 63 | kcFormGroupClass=form-group 64 | kcFormGroupErrorClass=has-error 65 | kcLabelClass=pf-c-form__label pf-c-form__label-text 66 | kcLabelWrapperClass=col-xs-12 col-sm-12 col-md-12 col-lg-12 67 | kcInputClass=pf-c-form-control 68 | kcInputHelperTextBeforeClass=pf-c-form__helper-text pf-c-form__helper-text-before 69 | kcInputHelperTextAfterClass=pf-c-form__helper-text pf-c-form__helper-text-after 70 | kcInputClassRadio=pf-c-radio 71 | kcInputClassRadioInput=pf-c-radio__input 72 | kcInputClassRadioLabel=pf-c-radio__label 73 | kcInputClassCheckbox=pf-c-check 74 | kcInputClassCheckboxInput=pf-c-check__input 75 | kcInputClassCheckboxLabel=pf-c-check__label 76 | kcInputClassRadioCheckboxLabelDisabled=pf-m-disabled 77 | kcInputErrorMessageClass=pf-c-form__helper-text pf-m-error required kc-feedback-text 78 | kcInputWrapperClass=col-xs-12 col-sm-12 col-md-12 col-lg-12 79 | kcFormOptionsClass=col-xs-12 col-sm-12 col-md-12 col-lg-12 80 | kcFormButtonsClass=col-xs-12 col-sm-12 col-md-12 col-lg-12 81 | kcFormSettingClass=login-pf-settings 82 | kcTextareaClass=form-control 83 | kcSignUpClass=login-pf-signup 84 | 85 | 86 | kcInfoAreaClass=col-xs-12 col-sm-4 col-md-4 col-lg-5 details 87 | 88 | ### user-profile grouping 89 | kcFormGroupHeader=pf-c-form__group 90 | 91 | ##### css classes for form buttons 92 | # main class used for all buttons 93 | kcButtonClass=pf-c-button 94 | # classes defining priority of the button - primary or default (there is typically only one priority button for the form) 95 | kcButtonPrimaryClass=pf-m-primary 96 | kcButtonDefaultClass=btn-default 97 | # classes defining size of the button 98 | kcButtonLargeClass=btn-lg 99 | kcButtonBlockClass=pf-m-block 100 | 101 | ##### css classes for input 102 | kcInputLargeClass=input-lg 103 | 104 | ##### css classes for form accessability 105 | kcSrOnlyClass=sr-only 106 | 107 | ##### css classes for select-authenticator form 108 | kcSelectAuthListClass=pf-l-stack select-auth-container 109 | kcSelectAuthListItemClass=pf-l-stack__item select-auth-box-parent pf-l-split 110 | kcSelectAuthListItemIconClass=pf-l-split__item select-auth-box-icon 111 | kcSelectAuthListItemIconPropertyClass=fa-2x select-auth-box-icon-properties 112 | kcSelectAuthListItemBodyClass=pf-l-split__item pf-l-stack 113 | kcSelectAuthListItemHeadingClass=pf-l-stack__item select-auth-box-headline pf-c-title 114 | kcSelectAuthListItemDescriptionClass=pf-l-stack__item select-auth-box-desc 115 | kcSelectAuthListItemFillClass=pf-l-split__item pf-m-fill 116 | kcSelectAuthListItemArrowClass=pf-l-split__item select-auth-box-arrow 117 | kcSelectAuthListItemArrowIconClass=fa fa-angle-right fa-lg 118 | kcSelectAuthListItemTitle=select-auth-box-paragraph 119 | 120 | ##### css classes for the authenticators 121 | kcAuthenticatorDefaultClass=fa fa-list list-view-pf-icon-lg 122 | kcAuthenticatorPasswordClass=fa fa-unlock list-view-pf-icon-lg 123 | kcAuthenticatorOTPClass=fa fa-mobile list-view-pf-icon-lg 124 | kcAuthenticatorWebAuthnClass=fa fa-key list-view-pf-icon-lg 125 | kcAuthenticatorWebAuthnPasswordlessClass=fa fa-key list-view-pf-icon-lg 126 | 127 | ##### css classes for the OTP Login Form 128 | kcLoginOTPListClass=pf-c-tile 129 | kcLoginOTPListInputClass=pf-c-tile__input 130 | kcLoginOTPListItemHeaderClass=pf-c-tile__header 131 | kcLoginOTPListItemIconBodyClass=pf-c-tile__icon 132 | kcLoginOTPListItemIconClass=fa fa-mobile 133 | kcLoginOTPListItemTitleClass=pf-c-tile__title 134 | 135 | ##### css classes for identity providers logos 136 | kcCommonLogoIdP=kc-social-provider-logo kc-social-gray 137 | 138 | ## Social 139 | kcLogoIdP-facebook=fa fa-facebook 140 | kcLogoIdP-google=fa fa-google 141 | kcLogoIdP-github=fa fa-github 142 | kcLogoIdP-linkedin=fa fa-linkedin 143 | kcLogoIdP-instagram=fa fa-instagram 144 | ## windows instead of microsoft - not included in PF4 145 | kcLogoIdP-microsoft=fa fa-windows 146 | kcLogoIdP-bitbucket=fa fa-bitbucket 147 | kcLogoIdP-gitlab=fa fa-gitlab 148 | kcLogoIdP-paypal=fa fa-paypal 149 | kcLogoIdP-stackoverflow=fa fa-stack-overflow 150 | kcLogoIdP-twitter=fa fa-twitter 151 | kcLogoIdP-openshift-v4=pf-icon pf-icon-openshift 152 | kcLogoIdP-openshift-v3=pf-icon pf-icon-openshift 153 | 154 | ## Recovery codes 155 | kcRecoveryCodesWarning=kc-recovery-codes-warning 156 | kcRecoveryCodesList=kc-recovery-codes-list 157 | kcRecoveryCodesActions=kc-recovery-codes-actions 158 | kcRecoveryCodesConfirmation=kc-recovery-codes-confirmation 159 | kcCheckClass=pf-c-check 160 | kcCheckInputClass=pf-c-check__input 161 | kcCheckLabelClass=pf-c-check__label 162 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/keycloak-server.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | "hostname": { 4 | "provider": "${keycloak.hostname.provider:}", 5 | 6 | "default": { 7 | "frontendUrl": "${keycloak.frontendUrl:}", 8 | "adminUrl": "${keycloak.adminUrl:}", 9 | "forceBackendUrlToFrontendUrl": "${keycloak.hostname.default.forceBackendUrlToFrontendUrl:}" 10 | } 11 | }, 12 | 13 | "eventsStore": { 14 | "provider": "${keycloak.eventsStore.provider:jpa}", 15 | "jpa": { 16 | "max-detail-length": "${keycloak.eventsStore.maxDetailLength:1000}" 17 | } 18 | }, 19 | 20 | "deploymentState": { 21 | "provider": "${keycloak.deploymentState.provider:jpa}" 22 | }, 23 | 24 | "dblock": { 25 | "provider": "${keycloak.dblock.provider:jpa}" 26 | }, 27 | 28 | "realm": { 29 | "provider": "${keycloak.realm.provider:jpa}" 30 | }, 31 | 32 | "client": { 33 | "provider": "${keycloak.client.provider:jpa}" 34 | }, 35 | 36 | "clientScope": { 37 | "provider": "${keycloak.clientScope.provider:jpa}" 38 | }, 39 | 40 | "group": { 41 | "provider": "${keycloak.group.provider:jpa}" 42 | }, 43 | 44 | "role": { 45 | "provider": "${keycloak.role.provider:jpa}" 46 | }, 47 | 48 | "authenticationSessions": { 49 | "provider": "${keycloak.authSession.provider:infinispan}", 50 | "infinispan": { 51 | "authSessionsLimit": "${keycloak.authSessions.limit:300}" 52 | } 53 | }, 54 | 55 | "userSessions": { 56 | "provider": "${keycloak.userSession.provider:infinispan}" 57 | }, 58 | 59 | "loginFailure": { 60 | "provider": "${keycloak.loginFailure.provider:infinispan}" 61 | }, 62 | 63 | "singleUseObject": { 64 | "provider": "${keycloak.singleUseObject.provider:infinispan}" 65 | }, 66 | 67 | "publicKeyStorage": { 68 | "provider": "${keycloak.publicKeyStorage.provider:infinispan}" 69 | }, 70 | 71 | "user": { 72 | "provider": "${keycloak.user.provider:jpa}" 73 | }, 74 | 75 | "userFederatedStorage": { 76 | "provider": "${keycloak.userFederatedStorage.provider:}" 77 | }, 78 | 79 | "userSessionPersister": { 80 | "provider": "${keycloak.userSessionPersister.provider:}" 81 | }, 82 | 83 | "authorizationPersister": { 84 | "provider": "${keycloak.authorization.provider:jpa}" 85 | }, 86 | 87 | "theme": { 88 | "staticMaxAge": "${keycloak.theme.staticMaxAge:}", 89 | "cacheTemplates": "${keycloak.theme.cacheTemplates:}", 90 | "cacheThemes": "${keycloak.theme.cacheThemes:}", 91 | "folder": { 92 | "dir": "${keycloak.theme.dir}" 93 | } 94 | }, 95 | 96 | "connectionsJpa": { 97 | "default": { 98 | "url": "${keycloak.connectionsJpa.url:jdbc:h2:mem:test;DB_CLOSE_DELAY=-1}", 99 | "driver": "${keycloak.connectionsJpa.driver:org.h2.Driver}", 100 | "driverDialect": "${keycloak.connectionsJpa.driverDialect:}", 101 | "user": "${keycloak.connectionsJpa.user:sa}", 102 | "password": "${keycloak.connectionsJpa.password:}", 103 | "showSql": "${keycloak.connectionsJpa.showSql:}", 104 | "formatSql": "${keycloak.connectionsJpa.formatSql:}", 105 | "globalStatsInterval": "${keycloak.connectionsJpa.globalStatsInterval:}" 106 | } 107 | }, 108 | 109 | "realmCache": { 110 | "default" : { 111 | "enabled": "${keycloak.realmCache.enabled:true}" 112 | } 113 | }, 114 | 115 | "userCache": { 116 | "default" : { 117 | "enabled": "${keycloak.userCache.enabled:true}" 118 | }, 119 | "mem": { 120 | "maxSize": 20000 121 | } 122 | }, 123 | 124 | "publicKeyCache": { 125 | "default" : { 126 | "enabled": "${keycloak.publicKeyCache.enabled:true}" 127 | } 128 | }, 129 | 130 | "authorizationCache": { 131 | "default": { 132 | "enabled": "${keycloak.authorizationCache.enabled:true}" 133 | } 134 | }, 135 | 136 | "connectionsInfinispan": { 137 | "default": { 138 | "jgroupsUdpMcastAddr": "${keycloak.connectionsInfinispan.jgroupsUdpMcastAddr:234.56.78.90}", 139 | "nodeName": "${keycloak.connectionsInfinispan.nodeName,jboss.node.name:}", 140 | "siteName": "${keycloak.connectionsInfinispan.siteName,jboss.site.name:}", 141 | "clustered": "${keycloak.connectionsInfinispan.clustered:}", 142 | "async": "${keycloak.connectionsInfinispan.async:}", 143 | "sessionsOwners": "${keycloak.connectionsInfinispan.sessionsOwners:}", 144 | "l1Lifespan": "${keycloak.connectionsInfinispan.l1Lifespan:}", 145 | "remoteStoreEnabled": "${keycloak.connectionsInfinispan.remoteStoreEnabled:}", 146 | "remoteStoreHost": "${keycloak.connectionsInfinispan.remoteStoreServer:}", 147 | "remoteStorePort": "${keycloak.connectionsInfinispan.remoteStorePort:}", 148 | "hotrodProtocolVersion": "${keycloak.connectionsInfinispan.hotrodProtocolVersion}", 149 | "embedded": "${keycloak.connectionsInfinispan.embedded:true}" 150 | } 151 | }, 152 | 153 | "scripting": { 154 | }, 155 | 156 | "jta-lookup": { 157 | "provider": "${keycloak.jta.lookup.provider:}" 158 | }, 159 | 160 | "login-protocol": { 161 | "openid-connect": { 162 | "legacy-logout-redirect-uri": "${keycloak.oidc.legacyLogoutRedirectUri:false}" 163 | }, 164 | "saml": { 165 | "knownProtocols": [ 166 | "http=${auth.server.http.port}", 167 | "https=${auth.server.https.port}" 168 | ] 169 | } 170 | }, 171 | 172 | "userProfile": { 173 | "provider": "${keycloak.userProfile.provider:declarative-user-profile}", 174 | "declarative-user-profile": { 175 | "read-only-attributes": [ "deniedFoo", "deniedBar*", "deniedSome/thing", "deniedsome*thing" ], 176 | "admin-read-only-attributes": [ "deniedSomeAdmin" ] 177 | } 178 | }, 179 | 180 | "x509cert-lookup": { 181 | "provider": "${keycloak.x509cert.lookup.provider:}", 182 | "haproxy": { 183 | "sslClientCert": "x-ssl-client-cert", 184 | "sslCertChainPrefix": "x-ssl-client-cert-chain", 185 | "certificateChainLength": 1 186 | }, 187 | "apache": { 188 | "sslClientCert": "x-ssl-client-cert", 189 | "sslCertChainPrefix": "x-ssl-client-cert-chain", 190 | "certificateChainLength": 1 191 | }, 192 | "nginx": { 193 | "sslClientCert": "x-ssl-client-cert", 194 | "sslCertChainPrefix": "x-ssl-client-cert-chain", 195 | "certificateChainLength": 1 196 | } 197 | } 198 | 199 | } 200 | -------------------------------------------------------------------------------- /mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM https://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM set title of command window 39 | title %0 40 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' 41 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 42 | 43 | @REM set %HOME% to equivalent of $HOME 44 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 45 | 46 | @REM Execute a user defined script before this one 47 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 48 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 49 | if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* 50 | if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* 51 | :skipRcPre 52 | 53 | @setlocal 54 | 55 | set ERROR_CODE=0 56 | 57 | @REM To isolate internal variables from possible post scripts, we use another setlocal 58 | @setlocal 59 | 60 | @REM ==== START VALIDATION ==== 61 | if not "%JAVA_HOME%" == "" goto OkJHome 62 | 63 | echo. 64 | echo Error: JAVA_HOME not found in your environment. >&2 65 | echo Please set the JAVA_HOME variable in your environment to match the >&2 66 | echo location of your Java installation. >&2 67 | echo. 68 | goto error 69 | 70 | :OkJHome 71 | if exist "%JAVA_HOME%\bin\java.exe" goto init 72 | 73 | echo. 74 | echo Error: JAVA_HOME is set to an invalid directory. >&2 75 | echo JAVA_HOME = "%JAVA_HOME%" >&2 76 | echo Please set the JAVA_HOME variable in your environment to match the >&2 77 | echo location of your Java installation. >&2 78 | echo. 79 | goto error 80 | 81 | @REM ==== END VALIDATION ==== 82 | 83 | :init 84 | 85 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 86 | @REM Fallback to current working directory if not found. 87 | 88 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 89 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 90 | 91 | set EXEC_DIR=%CD% 92 | set WDIR=%EXEC_DIR% 93 | :findBaseDir 94 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 95 | cd .. 96 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 97 | set WDIR=%CD% 98 | goto findBaseDir 99 | 100 | :baseDirFound 101 | set MAVEN_PROJECTBASEDIR=%WDIR% 102 | cd "%EXEC_DIR%" 103 | goto endDetectBaseDir 104 | 105 | :baseDirNotFound 106 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 107 | cd "%EXEC_DIR%" 108 | 109 | :endDetectBaseDir 110 | 111 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 112 | 113 | @setlocal EnableExtensions EnableDelayedExpansion 114 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 115 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 116 | 117 | :endReadAdditionalConfig 118 | 119 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 120 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 121 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 122 | 123 | set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 124 | 125 | FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 126 | IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 127 | ) 128 | 129 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 130 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. 131 | if exist %WRAPPER_JAR% ( 132 | if "%MVNW_VERBOSE%" == "true" ( 133 | echo Found %WRAPPER_JAR% 134 | ) 135 | ) else ( 136 | if not "%MVNW_REPOURL%" == "" ( 137 | SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 138 | ) 139 | if "%MVNW_VERBOSE%" == "true" ( 140 | echo Couldn't find %WRAPPER_JAR%, downloading it ... 141 | echo Downloading from: %DOWNLOAD_URL% 142 | ) 143 | 144 | powershell -Command "&{"^ 145 | "$webclient = new-object System.Net.WebClient;"^ 146 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ 147 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ 148 | "}"^ 149 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ 150 | "}" 151 | if "%MVNW_VERBOSE%" == "true" ( 152 | echo Finished downloading %WRAPPER_JAR% 153 | ) 154 | ) 155 | @REM End of extension 156 | 157 | @REM Provide a "standardized" way to retrieve the CLI args that will 158 | @REM work with both Windows and non-Windows executions. 159 | set MAVEN_CMD_LINE_ARGS=%* 160 | 161 | %MAVEN_JAVA_EXE% ^ 162 | %JVM_CONFIG_MAVEN_PROPS% ^ 163 | %MAVEN_OPTS% ^ 164 | %MAVEN_DEBUG_OPTS% ^ 165 | -classpath %WRAPPER_JAR% ^ 166 | "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ 167 | %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 168 | if ERRORLEVEL 1 goto error 169 | goto end 170 | 171 | :error 172 | set ERROR_CODE=1 173 | 174 | :end 175 | @endlocal & set ERROR_CODE=%ERROR_CODE% 176 | 177 | if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost 178 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 179 | if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" 180 | if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" 181 | :skipRcPost 182 | 183 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 184 | if "%MAVEN_BATCH_PAUSE%"=="on" pause 185 | 186 | if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% 187 | 188 | cmd /C exit /B %ERROR_CODE% 189 | -------------------------------------------------------------------------------- /mvnw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ---------------------------------------------------------------------------- 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # https://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # ---------------------------------------------------------------------------- 20 | 21 | # ---------------------------------------------------------------------------- 22 | # Maven Start Up Batch script 23 | # 24 | # Required ENV vars: 25 | # ------------------ 26 | # JAVA_HOME - location of a JDK home dir 27 | # 28 | # Optional ENV vars 29 | # ----------------- 30 | # M2_HOME - location of maven2's installed home dir 31 | # MAVEN_OPTS - parameters passed to the Java VM when running Maven 32 | # e.g. to debug Maven itself, use 33 | # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 34 | # MAVEN_SKIP_RC - flag to disable loading of mavenrc files 35 | # ---------------------------------------------------------------------------- 36 | 37 | if [ -z "$MAVEN_SKIP_RC" ] ; then 38 | 39 | if [ -f /usr/local/etc/mavenrc ] ; then 40 | . /usr/local/etc/mavenrc 41 | fi 42 | 43 | if [ -f /etc/mavenrc ] ; then 44 | . /etc/mavenrc 45 | fi 46 | 47 | if [ -f "$HOME/.mavenrc" ] ; then 48 | . "$HOME/.mavenrc" 49 | fi 50 | 51 | fi 52 | 53 | # OS specific support. $var _must_ be set to either true or false. 54 | cygwin=false; 55 | darwin=false; 56 | mingw=false 57 | case "`uname`" in 58 | CYGWIN*) cygwin=true ;; 59 | MINGW*) mingw=true;; 60 | Darwin*) darwin=true 61 | # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home 62 | # See https://developer.apple.com/library/mac/qa/qa1170/_index.html 63 | if [ -z "$JAVA_HOME" ]; then 64 | if [ -x "/usr/libexec/java_home" ]; then 65 | export JAVA_HOME="`/usr/libexec/java_home`" 66 | else 67 | export JAVA_HOME="/Library/Java/Home" 68 | fi 69 | fi 70 | ;; 71 | esac 72 | 73 | if [ -z "$JAVA_HOME" ] ; then 74 | if [ -r /etc/gentoo-release ] ; then 75 | JAVA_HOME=`java-config --jre-home` 76 | fi 77 | fi 78 | 79 | if [ -z "$M2_HOME" ] ; then 80 | ## resolve links - $0 may be a link to maven's home 81 | PRG="$0" 82 | 83 | # need this for relative symlinks 84 | while [ -h "$PRG" ] ; do 85 | ls=`ls -ld "$PRG"` 86 | link=`expr "$ls" : '.*-> \(.*\)$'` 87 | if expr "$link" : '/.*' > /dev/null; then 88 | PRG="$link" 89 | else 90 | PRG="`dirname "$PRG"`/$link" 91 | fi 92 | done 93 | 94 | saveddir=`pwd` 95 | 96 | M2_HOME=`dirname "$PRG"`/.. 97 | 98 | # make it fully qualified 99 | M2_HOME=`cd "$M2_HOME" && pwd` 100 | 101 | cd "$saveddir" 102 | # echo Using m2 at $M2_HOME 103 | fi 104 | 105 | # For Cygwin, ensure paths are in UNIX format before anything is touched 106 | if $cygwin ; then 107 | [ -n "$M2_HOME" ] && 108 | M2_HOME=`cygpath --unix "$M2_HOME"` 109 | [ -n "$JAVA_HOME" ] && 110 | JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 111 | [ -n "$CLASSPATH" ] && 112 | CLASSPATH=`cygpath --path --unix "$CLASSPATH"` 113 | fi 114 | 115 | # For Mingw, ensure paths are in UNIX format before anything is touched 116 | if $mingw ; then 117 | [ -n "$M2_HOME" ] && 118 | M2_HOME="`(cd "$M2_HOME"; pwd)`" 119 | [ -n "$JAVA_HOME" ] && 120 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" 121 | fi 122 | 123 | if [ -z "$JAVA_HOME" ]; then 124 | javaExecutable="`which javac`" 125 | if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then 126 | # readlink(1) is not available as standard on Solaris 10. 127 | readLink=`which readlink` 128 | if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then 129 | if $darwin ; then 130 | javaHome="`dirname \"$javaExecutable\"`" 131 | javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" 132 | else 133 | javaExecutable="`readlink -f \"$javaExecutable\"`" 134 | fi 135 | javaHome="`dirname \"$javaExecutable\"`" 136 | javaHome=`expr "$javaHome" : '\(.*\)/bin'` 137 | JAVA_HOME="$javaHome" 138 | export JAVA_HOME 139 | fi 140 | fi 141 | fi 142 | 143 | if [ -z "$JAVACMD" ] ; then 144 | if [ -n "$JAVA_HOME" ] ; then 145 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 146 | # IBM's JDK on AIX uses strange locations for the executables 147 | JAVACMD="$JAVA_HOME/jre/sh/java" 148 | else 149 | JAVACMD="$JAVA_HOME/bin/java" 150 | fi 151 | else 152 | JAVACMD="`\\unset -f command; \\command -v java`" 153 | fi 154 | fi 155 | 156 | if [ ! -x "$JAVACMD" ] ; then 157 | echo "Error: JAVA_HOME is not defined correctly." >&2 158 | echo " We cannot execute $JAVACMD" >&2 159 | exit 1 160 | fi 161 | 162 | if [ -z "$JAVA_HOME" ] ; then 163 | echo "Warning: JAVA_HOME environment variable is not set." 164 | fi 165 | 166 | CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher 167 | 168 | # traverses directory structure from process work directory to filesystem root 169 | # first directory with .mvn subdirectory is considered project base directory 170 | find_maven_basedir() { 171 | 172 | if [ -z "$1" ] 173 | then 174 | echo "Path not specified to find_maven_basedir" 175 | return 1 176 | fi 177 | 178 | basedir="$1" 179 | wdir="$1" 180 | while [ "$wdir" != '/' ] ; do 181 | if [ -d "$wdir"/.mvn ] ; then 182 | basedir=$wdir 183 | break 184 | fi 185 | # workaround for JBEAP-8937 (on Solaris 10/Sparc) 186 | if [ -d "${wdir}" ]; then 187 | wdir=`cd "$wdir/.."; pwd` 188 | fi 189 | # end of workaround 190 | done 191 | echo "${basedir}" 192 | } 193 | 194 | # concatenates all lines of a file 195 | concat_lines() { 196 | if [ -f "$1" ]; then 197 | echo "$(tr -s '\n' ' ' < "$1")" 198 | fi 199 | } 200 | 201 | BASE_DIR=`find_maven_basedir "$(pwd)"` 202 | if [ -z "$BASE_DIR" ]; then 203 | exit 1; 204 | fi 205 | 206 | ########################################################################################## 207 | # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 208 | # This allows using the maven wrapper in projects that prohibit checking in binary data. 209 | ########################################################################################## 210 | if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then 211 | if [ "$MVNW_VERBOSE" = true ]; then 212 | echo "Found .mvn/wrapper/maven-wrapper.jar" 213 | fi 214 | else 215 | if [ "$MVNW_VERBOSE" = true ]; then 216 | echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." 217 | fi 218 | if [ -n "$MVNW_REPOURL" ]; then 219 | jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 220 | else 221 | jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 222 | fi 223 | while IFS="=" read key value; do 224 | case "$key" in (wrapperUrl) jarUrl="$value"; break ;; 225 | esac 226 | done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" 227 | if [ "$MVNW_VERBOSE" = true ]; then 228 | echo "Downloading from: $jarUrl" 229 | fi 230 | wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" 231 | if $cygwin; then 232 | wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` 233 | fi 234 | 235 | if command -v wget > /dev/null; then 236 | if [ "$MVNW_VERBOSE" = true ]; then 237 | echo "Found wget ... using wget" 238 | fi 239 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 240 | wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" 241 | else 242 | wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" 243 | fi 244 | elif command -v curl > /dev/null; then 245 | if [ "$MVNW_VERBOSE" = true ]; then 246 | echo "Found curl ... using curl" 247 | fi 248 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 249 | curl -o "$wrapperJarPath" "$jarUrl" -f 250 | else 251 | curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f 252 | fi 253 | 254 | else 255 | if [ "$MVNW_VERBOSE" = true ]; then 256 | echo "Falling back to using Java to download" 257 | fi 258 | javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" 259 | # For Cygwin, switch paths to Windows format before running javac 260 | if $cygwin; then 261 | javaClass=`cygpath --path --windows "$javaClass"` 262 | fi 263 | if [ -e "$javaClass" ]; then 264 | if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 265 | if [ "$MVNW_VERBOSE" = true ]; then 266 | echo " - Compiling MavenWrapperDownloader.java ..." 267 | fi 268 | # Compiling the Java class 269 | ("$JAVA_HOME/bin/javac" "$javaClass") 270 | fi 271 | if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 272 | # Running the downloader 273 | if [ "$MVNW_VERBOSE" = true ]; then 274 | echo " - Running MavenWrapperDownloader.java ..." 275 | fi 276 | ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") 277 | fi 278 | fi 279 | fi 280 | fi 281 | ########################################################################################## 282 | # End of extension 283 | ########################################################################################## 284 | 285 | export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} 286 | if [ "$MVNW_VERBOSE" = true ]; then 287 | echo $MAVEN_PROJECTBASEDIR 288 | fi 289 | MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" 290 | 291 | # For Cygwin, switch paths to Windows format before running java 292 | if $cygwin; then 293 | [ -n "$M2_HOME" ] && 294 | M2_HOME=`cygpath --path --windows "$M2_HOME"` 295 | [ -n "$JAVA_HOME" ] && 296 | JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` 297 | [ -n "$CLASSPATH" ] && 298 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"` 299 | [ -n "$MAVEN_PROJECTBASEDIR" ] && 300 | MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` 301 | fi 302 | 303 | # Provide a "standardized" way to retrieve the CLI args that will 304 | # work with both Windows and non-Windows executions. 305 | MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" 306 | export MAVEN_CMD_LINE_ARGS 307 | 308 | WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 309 | 310 | exec "$JAVACMD" \ 311 | $MAVEN_OPTS \ 312 | $MAVEN_DEBUG_OPTS \ 313 | -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ 314 | "-Dmaven.home=${M2_HOME}" \ 315 | "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ 316 | ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" 317 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /src/main/resources/theme/providers-only/login/resources/css/login.css: -------------------------------------------------------------------------------- 1 | /* Patternfly CSS places a "bg-login.jpg" as the background on this ".login-pf" class. 2 | This clashes with the "keycloak-bg.png' background defined on the body below. 3 | Therefore the Patternfly background must be set to none. */ 4 | .login-pf { 5 | background: none; 6 | } 7 | 8 | .login-pf body { 9 | background-size: cover; 10 | height: 100%; 11 | } 12 | 13 | textarea.pf-c-form-control { 14 | height: auto; 15 | } 16 | 17 | .pf-c-alert__title { 18 | font-size: var(--pf-global--FontSize--xs); 19 | } 20 | 21 | p.instruction { 22 | margin: 5px 0; 23 | } 24 | 25 | .pf-c-button.pf-m-control { 26 | border: solid var(--pf-global--BorderWidth--sm); 27 | border-color: rgba(230, 230, 230, 0.5); 28 | } 29 | 30 | h1#kc-page-title { 31 | margin-top: 10px; 32 | } 33 | 34 | #kc-locale ul { 35 | background-color: var(--pf-global--BackgroundColor--100); 36 | display: none; 37 | top: 20px; 38 | min-width: 100px; 39 | padding: 0; 40 | } 41 | 42 | #kc-locale-dropdown{ 43 | display: inline-block; 44 | } 45 | 46 | #kc-locale-dropdown:hover ul { 47 | display:block; 48 | } 49 | 50 | #kc-locale-dropdown a { 51 | color: var(--pf-global--Color--200); 52 | text-align: right; 53 | font-size: var(--pf-global--FontSize--sm); 54 | } 55 | 56 | a#kc-current-locale-link::after { 57 | content: "\2c5"; 58 | margin-left: var(--pf-global--spacer--xs) 59 | } 60 | 61 | .login-pf .container { 62 | padding-top: 40px; 63 | } 64 | 65 | .login-pf a:hover { 66 | color: #0099d3; 67 | } 68 | 69 | #kc-logo { 70 | width: 100%; 71 | } 72 | 73 | div.kc-logo-text { 74 | background-image: url(../img/keycloak-logo-text.png); 75 | background-repeat: no-repeat; 76 | height: 63px; 77 | width: 300px; 78 | margin: 0 auto; 79 | } 80 | 81 | div.kc-logo-text span { 82 | display: none; 83 | } 84 | 85 | #kc-header { 86 | color: #ededed; 87 | overflow: visible; 88 | white-space: nowrap; 89 | } 90 | 91 | #kc-header-wrapper { 92 | font-size: 29px; 93 | text-transform: uppercase; 94 | letter-spacing: 3px; 95 | line-height: 1.2em; 96 | padding: 62px 10px 20px; 97 | white-space: normal; 98 | } 99 | 100 | #kc-content { 101 | width: 100%; 102 | } 103 | 104 | #kc-attempted-username { 105 | font-size: 20px; 106 | font-family: inherit; 107 | font-weight: normal; 108 | padding-right: 10px; 109 | } 110 | 111 | #kc-username { 112 | text-align: center; 113 | margin-bottom:-10px; 114 | } 115 | 116 | #kc-webauthn-settings-form { 117 | padding-top: 8px; 118 | } 119 | 120 | #kc-form-webauthn .select-auth-box-parent { 121 | pointer-events: none; 122 | } 123 | 124 | #kc-form-webauthn .select-auth-box-desc { 125 | color: var(--pf-global--palette--black-600); 126 | } 127 | 128 | #kc-form-webauthn .select-auth-box-headline { 129 | color: var(--pf-global--Color--300); 130 | } 131 | 132 | #kc-form-webauthn .select-auth-box-icon { 133 | flex: 0 0 3em; 134 | } 135 | 136 | #kc-form-webauthn .select-auth-box-icon-properties { 137 | margin-top: 10px; 138 | font-size: 1.8em; 139 | } 140 | 141 | #kc-form-webauthn .select-auth-box-icon-properties.unknown-transport-class { 142 | margin-top: 3px; 143 | } 144 | 145 | #kc-form-webauthn .pf-l-stack__item { 146 | margin: -1px 0; 147 | } 148 | 149 | #kc-content-wrapper { 150 | margin-top: 20px; 151 | } 152 | 153 | #kc-form-wrapper { 154 | margin-top: 10px; 155 | } 156 | 157 | #kc-info { 158 | margin: 20px -40px -30px; 159 | } 160 | 161 | #kc-info-wrapper { 162 | font-size: 13px; 163 | padding: 15px 35px; 164 | background-color: #F0F0F0; 165 | } 166 | 167 | #kc-form-options span { 168 | display: block; 169 | } 170 | 171 | #kc-form-options .checkbox { 172 | margin-top: 0; 173 | color: #72767b; 174 | } 175 | 176 | #kc-terms-text { 177 | margin-bottom: 20px; 178 | } 179 | 180 | #kc-registration { 181 | margin-bottom: 0; 182 | } 183 | 184 | /* TOTP */ 185 | 186 | .subtitle { 187 | text-align: right; 188 | margin-top: 30px; 189 | color: #909090; 190 | } 191 | 192 | .required { 193 | color: var(--pf-global--danger-color--200); 194 | } 195 | 196 | ol#kc-totp-settings { 197 | margin: 0; 198 | padding-left: 20px; 199 | } 200 | 201 | ul#kc-totp-supported-apps { 202 | margin-bottom: 10px; 203 | } 204 | 205 | #kc-totp-secret-qr-code { 206 | max-width:150px; 207 | max-height:150px; 208 | } 209 | 210 | #kc-totp-secret-key { 211 | background-color: #fff; 212 | color: #333333; 213 | font-size: 16px; 214 | padding: 10px 0; 215 | } 216 | 217 | /* OAuth */ 218 | 219 | #kc-oauth h3 { 220 | margin-top: 0; 221 | } 222 | 223 | #kc-oauth ul { 224 | list-style: none; 225 | padding: 0; 226 | margin: 0; 227 | } 228 | 229 | #kc-oauth ul li { 230 | border-top: 1px solid rgba(255, 255, 255, 0.1); 231 | font-size: 12px; 232 | padding: 10px 0; 233 | } 234 | 235 | #kc-oauth ul li:first-of-type { 236 | border-top: 0; 237 | } 238 | 239 | #kc-oauth .kc-role { 240 | display: inline-block; 241 | width: 50%; 242 | } 243 | 244 | /* Code */ 245 | #kc-code textarea { 246 | width: 100%; 247 | height: 8em; 248 | } 249 | 250 | /* Social */ 251 | .kc-social-links { 252 | margin-top: 20px; 253 | } 254 | 255 | .kc-social-provider-logo { 256 | font-size: 23px; 257 | width: 30px; 258 | height: 25px; 259 | float: left; 260 | } 261 | 262 | .kc-social-gray { 263 | color: var(--pf-global--Color--200); 264 | } 265 | 266 | .kc-social-item { 267 | margin-bottom: var(--pf-global--spacer--sm); 268 | font-size: 15px; 269 | text-align: center; 270 | } 271 | 272 | .kc-social-provider-name { 273 | position: relative; 274 | top: 3px; 275 | } 276 | 277 | .kc-social-icon-text { 278 | left: -15px; 279 | } 280 | 281 | .kc-social-grid { 282 | display:grid; 283 | grid-column-gap: 10px; 284 | grid-row-gap: 5px; 285 | grid-column-end: span 6; 286 | --pf-l-grid__item--GridColumnEnd: span 6; 287 | } 288 | 289 | .kc-social-grid .kc-social-icon-text { 290 | left: -10px; 291 | } 292 | 293 | .kc-login-tooltip { 294 | position: relative; 295 | display: inline-block; 296 | } 297 | 298 | .kc-social-section { 299 | text-align: center; 300 | } 301 | 302 | .kc-social-section hr{ 303 | margin-bottom: 10px 304 | } 305 | 306 | .kc-login-tooltip .kc-tooltip-text{ 307 | top:-3px; 308 | left:160%; 309 | background-color: black; 310 | visibility: hidden; 311 | color: #fff; 312 | 313 | min-width:130px; 314 | text-align: center; 315 | border-radius: 2px; 316 | box-shadow:0 1px 8px rgba(0,0,0,0.6); 317 | padding: 5px; 318 | 319 | position: absolute; 320 | opacity:0; 321 | transition:opacity 0.5s; 322 | } 323 | 324 | /* Show tooltip */ 325 | .kc-login-tooltip:hover .kc-tooltip-text { 326 | visibility: visible; 327 | opacity:0.7; 328 | } 329 | 330 | /* Arrow for tooltip */ 331 | .kc-login-tooltip .kc-tooltip-text::after { 332 | content: " "; 333 | position: absolute; 334 | top: 15px; 335 | right: 100%; 336 | margin-top: -5px; 337 | border-width: 5px; 338 | border-style: solid; 339 | border-color: transparent black transparent transparent; 340 | } 341 | 342 | @media (min-width: 768px) { 343 | #kc-container-wrapper { 344 | position: absolute; 345 | width: 100%; 346 | } 347 | 348 | .login-pf .container { 349 | padding-right: 80px; 350 | } 351 | 352 | #kc-locale { 353 | position: relative; 354 | text-align: right; 355 | z-index: 9999; 356 | } 357 | } 358 | 359 | @media (max-width: 767px) { 360 | 361 | .login-pf body { 362 | background: white; 363 | } 364 | 365 | #kc-header { 366 | padding-left: 15px; 367 | padding-right: 15px; 368 | float: none; 369 | text-align: left; 370 | } 371 | 372 | #kc-header-wrapper { 373 | font-size: 16px; 374 | font-weight: bold; 375 | padding: 20px 60px 0 0; 376 | color: #72767b; 377 | letter-spacing: 0; 378 | } 379 | 380 | div.kc-logo-text { 381 | margin: 0; 382 | width: 150px; 383 | height: 32px; 384 | background-size: 100%; 385 | } 386 | 387 | #kc-form { 388 | float: none; 389 | } 390 | 391 | #kc-info-wrapper { 392 | border-top: 1px solid rgba(255, 255, 255, 0.1); 393 | background-color: transparent; 394 | } 395 | 396 | .login-pf .container { 397 | padding-top: 15px; 398 | padding-bottom: 15px; 399 | } 400 | 401 | #kc-locale { 402 | position: absolute; 403 | width: 200px; 404 | top: 20px; 405 | right: 20px; 406 | text-align: right; 407 | z-index: 9999; 408 | } 409 | } 410 | 411 | @media (min-height: 646px) { 412 | #kc-container-wrapper { 413 | bottom: 12%; 414 | } 415 | } 416 | 417 | @media (max-height: 645px) { 418 | #kc-container-wrapper { 419 | padding-top: 50px; 420 | top: 20%; 421 | } 422 | } 423 | 424 | .card-pf form.form-actions .btn { 425 | float: right; 426 | margin-left: 10px; 427 | } 428 | 429 | #kc-form-buttons { 430 | margin-top: 20px; 431 | } 432 | 433 | .login-pf-page .login-pf-brand { 434 | margin-top: 20px; 435 | max-width: 360px; 436 | width: 40%; 437 | } 438 | 439 | .select-auth-box-arrow{ 440 | display: flex; 441 | align-items: center; 442 | margin-right: 2rem; 443 | } 444 | 445 | .select-auth-box-icon{ 446 | display: flex; 447 | flex: 0 0 2em; 448 | justify-content: center; 449 | margin-right: 1rem; 450 | margin-left: 3rem; 451 | } 452 | 453 | .select-auth-box-parent{ 454 | border-top: 1px solid var(--pf-global--palette--black-200); 455 | padding-top: 1rem; 456 | padding-bottom: 1rem; 457 | cursor: pointer; 458 | } 459 | 460 | .select-auth-box-parent:hover{ 461 | background-color: #f7f8f8; 462 | } 463 | 464 | .select-auth-container { 465 | padding-bottom: 0px !important; 466 | } 467 | 468 | .select-auth-box-headline { 469 | font-size: var(--pf-global--FontSize--md); 470 | color: var(--pf-global--primary-color--100); 471 | font-weight: bold; 472 | } 473 | 474 | .select-auth-box-desc { 475 | font-size: var(--pf-global--FontSize--sm); 476 | } 477 | 478 | .select-auth-box-paragraph { 479 | text-align: center; 480 | font-size: var(--pf-global--FontSize--md); 481 | margin-bottom: 5px; 482 | } 483 | 484 | .card-pf { 485 | margin: 0 auto; 486 | box-shadow: var(--pf-global--BoxShadow--lg); 487 | padding: 0 20px; 488 | max-width: 500px; 489 | border-top: 4px solid; 490 | border-color: var(--pf-global--primary-color--100); 491 | } 492 | 493 | /*phone*/ 494 | @media (max-width: 767px) { 495 | .login-pf-page .card-pf { 496 | max-width: none; 497 | margin-left: 0; 498 | margin-right: 0; 499 | padding-top: 0; 500 | border-top: 0; 501 | box-shadow: 0 0; 502 | } 503 | 504 | .kc-social-grid { 505 | grid-column-end: 12; 506 | --pf-l-grid__item--GridColumnEnd: span 12; 507 | } 508 | 509 | .kc-social-grid .kc-social-icon-text { 510 | left: -15px; 511 | } 512 | } 513 | 514 | .login-pf-page .login-pf-signup { 515 | font-size: 15px; 516 | color: #72767b; 517 | } 518 | #kc-content-wrapper .row { 519 | margin-left: 0; 520 | margin-right: 0; 521 | } 522 | 523 | .login-pf-page.login-pf-page-accounts { 524 | margin-left: auto; 525 | margin-right: auto; 526 | } 527 | 528 | .login-pf-page .btn-primary { 529 | margin-top: 0; 530 | } 531 | 532 | .login-pf-page .list-view-pf .list-group-item { 533 | border-bottom: 1px solid #ededed; 534 | } 535 | 536 | .login-pf-page .list-view-pf-description { 537 | width: 100%; 538 | } 539 | 540 | #kc-form-login div.form-group:last-of-type, 541 | #kc-register-form div.form-group:last-of-type, 542 | #kc-update-profile-form div.form-group:last-of-type, 543 | #kc-update-email-form div.form-group:last-of-type{ 544 | margin-bottom: 0px; 545 | } 546 | 547 | .no-bottom-margin { 548 | margin-bottom: 0; 549 | } 550 | 551 | #kc-back { 552 | margin-top: 5px; 553 | } 554 | 555 | /* Recovery codes */ 556 | .kc-recovery-codes-warning { 557 | margin-bottom: 32px; 558 | } 559 | .kc-recovery-codes-warning .pf-c-alert__description p { 560 | font-size: 0.875rem; 561 | } 562 | .kc-recovery-codes-list { 563 | list-style: none; 564 | columns: 2; 565 | margin: 16px 0; 566 | padding: 16px 16px 8px 16px; 567 | border: 1px solid #D2D2D2; 568 | } 569 | .kc-recovery-codes-list li { 570 | margin-bottom: 8px; 571 | font-size: 11px; 572 | } 573 | .kc-recovery-codes-list li span { 574 | color: #6A6E73; 575 | width: 16px; 576 | text-align: right; 577 | display: inline-block; 578 | margin-right: 1px; 579 | } 580 | 581 | .kc-recovery-codes-actions { 582 | margin-bottom: 24px; 583 | } 584 | .kc-recovery-codes-actions button { 585 | padding-left: 0; 586 | } 587 | .kc-recovery-codes-actions button i { 588 | margin-right: 8px; 589 | } 590 | 591 | .kc-recovery-codes-confirmation { 592 | align-items: baseline; 593 | margin-bottom: 16px; 594 | } 595 | /* End Recovery codes */ 596 | --------------------------------------------------------------------------------