Skip to content

Instantly share code, notes, and snippets.

View mcupak's full-sized avatar

Miro Cupak mcupak

View GitHub Profile
@mcupak
mcupak / jboss-beans.xml
Created October 9, 2017 04:33
Netty LoggerConfigurator
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2011 The Netty Project
~
~ The Netty Project licenses this file to you under the Apache License,
~ version 2.0 (the "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at:
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
@mcupak
mcupak / disable-pojo.xml
Created October 9, 2017 04:36
Disabling the POJO subsystem on WildFly.
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:4.0">
<extensions>
...
<!-- <extension module="org.jboss.as.pojo"/> -->
...
</extensions>
...
@mcupak
mcupak / deployment-timeout.log
Created October 9, 2017 04:38
Timeout after [300] seconds waiting for service.
2016-07-25 14:38:28,370 ERROR [org.jboss.as.controller.management-operation]
(Controller Boot Thread) WFLYCTL0348: Timeout after [300] seconds waiting
for service
("core-service" => "management"),
("management-interface" => "http-interface")
]'
@mcupak
mcupak / deployment-timeout.xml
Created October 9, 2017 04:40
Increasing deployment timeout on WildFly.
...
<system-properties>
<property name="jboss.as.management.blocking.timeout" value="900"/>
</system-properties>
...
<profile>
...
<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir"
scan-interval="5000" deployment-timeout="900"
@mcupak
mcupak / secure-deployment.xml
Created October 9, 2017 04:45
Secure deployment configuration in Keycloak.
<secure-deployment name="sample-application.war">
<realm>sample-realm</realm>
<realm-public-key>MIIBI...IDAQAB</realm-public-key>
<auth-server-url>http://localhost:8080/auth</auth-server-url>
<ssl-required>ALL</ssl-required>
<resource>sample-application</resource>
<credential name="secret">6215871c-c4c7-40ce-acd2-fee9d65acccb</credential>
</secure-deployment>
@mcupak
mcupak / realm-configuration.cli
Created October 9, 2017 04:46
Keycloak realm configuration in Wildfly.
/subsystem=keycloak/realm=sample-realm:add(realm-public-key=MIIBI...IDAQAB,\
auth-server-url=http://localhost:8080/auth,ssl-required=all,\
disable-trust-manager=true)
@mcupak
mcupak / disable-sll.cli
Created October 9, 2017 04:48
Disable the requirement for secure communication in Keycloak.
/subsystem=keycloak/realm=sample-realm:write-attribute\
(name=ssl-required,value=none)
/subsystem=keycloak/realm=sample-realm:undefine-attribute\
(name=disable-trust-manager)
@mcupak
mcupak / ssl-config.cli
Created October 9, 2017 04:49
Configure SSL for Keycloak.
/subsystem=keycloak/realm=sample-realm:write-attribute\
(name=truststore,value=/usr/lib/jvm/java/jre/lib/security/cacerts)
/subsystem=keycloak/realm=sample-realm:write-attribute\
(name=truststore-password,value=changeit)
@mcupak
mcupak / secure-war.cli
Last active October 9, 2017 04:52
Securing WAR with Keycloak.
/subsystem=keycloak/secure-deployment=sample-application.war:\
add(realm=sample-realm,resource=sample-application)
/subsystem=keycloak/secure-deployment=sample-application.war/credential=secret:\
add(value=6215871c-c4c7-40ce-acd2-fee9d65acccb)
@mcupak
mcupak / secure-another-war.cli
Created October 9, 2017 04:52
Securing another WAR with Keycloak.
/subsystem=keycloak/secure-deployment=sample-application2.war:\
add(realm=sample-realm,resource=sample-application)
/subsystem=keycloak/secure-deployment=sample-application2.war/credential=secret:\
add(value=6215871c-c4c7-40ce-acd2-fee9d65acccb)