Commit 63bad93a authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Added keycloak to container and docker-compose.

parent 86eeb544
FROM jboss/keycloak
ARG admin_password=password
ARG prefix='fairdi\/keycloak'
USER jboss
RUN echo "s/<web-context>auth<\\/web-context>/<web-context>$prefix\\/auth<\\/web-context>/"
RUN sed -i -e "s/<web-context>auth<\\/web-context>/<web-context>$prefix\\/auth<\\/web-context>/" $JBOSS_HOME/standalone/configuration/standalone.xml
RUN sed -i -e "s/<web-context>auth<\\/web-context>/<web-context>$prefix\\/auth<\\/web-context>/" $JBOSS_HOME/standalone/configuration/standalone-ha.xml
RUN sed -i -e "s/name=\"\\/\"/name=\"\\/$prefix\\/\"/" $JBOSS_HOME/standalone/configuration/standalone.xml
RUN sed -i -e "s/name=\"\\/\"/name=\"\\/$prefix\\/\"/" $JBOSS_HOME/standalone/configuration/standalone-ha.xml
RUN sed -i -e "s/\\/auth/\\/$prefix\\/auth/" $JBOSS_HOME/welcome-content/index.html
ENV KEYCLOAK_USER=admin
ENV KEYCLOAK_PASSWORD=$admin_password
ENV KEYCLOAK_IMPORT=/opt/jboss/keycloak/import.json
ENV PROXY_ADDRESS_FORWARDING=true
ADD ./fairdi_nomad_test.json /opt/jboss/keycloak/fairdi_nomad_test.json
ADD ./fairdi_nomad_prod.json /opt/jboss/keycloak/fairdi_nomad_prod.json
RUN echo "[`cat /opt/jboss/keycloak/fairdi_nomad_test.json`,`/opt/jboss/keycloak/fairdi_nomad_prod.json`]"
ADD ./material_theme /opt/jboss/keycloak/themes/material
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<#import "template.ftl" as layout>
<@layout.registrationLayout; section>
<#if section = "title">
${msg("Edit your NOMAD account",(realm.displayName!''))?no_esc}
<#elseif section = "header">
<div class="title">
${msg("Edit your NOMAD account",(realm.displayNameHtml!''))?no_esc}
</div>
<#elseif section = "form">
<form id="kc-register-form" class="register form ${properties.kcFormClass!}" action="${url.accountUrl}" class="form-horizontal" method="post">
<input type="text" readonly value="this is not a login form" style="display: none;">
<input type="password" readonly value="this is not a login form" style="display: none;">
<input type="hidden" id="stateChecker" name="stateChecker" value="${stateChecker}">
<div class="mdc-text-field mdc-text-field--outlined mdc-text-field--with-leading-icon ${properties.kcLabelClass!}">
<i class="material-icons mdc-text-field__icon" tabindex="-1" role="button">person</i>
<input required id="firstName" class="mdc-text-field__input ${properties.kcInputClass!}" name="firstName" type="text" autofocus value="${(account.firstName!'')}">
<div class="${properties.kcLabelWrapperClass!}">
<label for="firstName" class="mdc-floating-label ${properties.kcLabelClass!}">${msg("firstName")?no_esc}</label>
</div>
<div class="mdc-notched-outline">
<svg>
<path class="mdc-notched-outline__path"/>
</svg>
</div>
<div class="mdc-notched-outline__idle"></div>
</div>
<div class="mdc-text-field mdc-text-field--outlined mdc-text-field--with-leading-icon ${properties.kcLabelClass!}">
<i class="material-icons mdc-text-field__icon" tabindex="-1" role="button">person</i>
<input required id="lastName" class="mdc-text-field__input ${properties.kcInputClass!}" name="lastName" type="text" value="${(account.lastName!'')}">
<div class="${properties.kcLabelWrapperClass!}">
<label for="lastName" class="mdc-floating-label ${properties.kcLabelClass!}">${msg("lastName")?no_esc}</label>
</div>
<div class="mdc-notched-outline">
<svg>
<path class="mdc-notched-outline__path"/>
</svg>
</div>
<div class="mdc-notched-outline__idle"></div>
</div>
<div class="mdc-text-field mdc-text-field--outlined mdc-text-field--with-leading-icon ${properties.kcLabelClass!}">
<i class="material-icons mdc-text-field__icon" tabindex="-1" role="button">email</i>
<input required id="email" class="mdc-text-field__input ${properties.kcInputClass!}" name="email" type="text" value="${(account.email!'')}">
<div class="${properties.kcLabelWrapperClass!}">
<label for="email" class="mdc-floating-label ${properties.kcLabelClass!}">${msg("email")?no_esc}</label>
</div>
<div class="mdc-notched-outline">
<svg>
<path class="mdc-notched-outline__path"/>
</svg>
</div>
<div class="mdc-notched-outline__idle"></div>
</div>
<div class="mdc-text-field mdc-text-field--outlined mdc-text-field--with-leading-icon ${properties.kcLabelClass!}">
<i class="material-icons mdc-text-field__icon" tabindex="-1" role="button">room</i>
<input required id="user.attributes.affiliation" class="mdc-text-field__input ${properties.kcInputClass!}" name="user.attributes.affiliation" type="text" value="${(account.attributes.affiliation!'')}">
<div class="${properties.kcLabelWrapperClass!}">
<label for="user.attributes.affiliation" class="mdc-floating-label ${properties.kcLabelClass!}">Affiliation</label>
</div>
<div class="mdc-notched-outline">
<svg>
<path class="mdc-notched-outline__path"/>
</svg>
</div>
<div class="mdc-notched-outline__idle"></div>
</div>
<div class="mdc-text-field mdc-text-field--outlined mdc-text-field--with-leading-icon ${properties.kcLabelClass!}">
<i class="material-icons mdc-text-field__icon" tabindex="-1" role="button">account_balance</i>
<input required id="user.attributes.affiliation_address" class="mdc-text-field__input ${properties.kcInputClass!}" name="user.attributes.affiliation_address" type="text" value="${(account.attributes.affiliation_address!'')}">
<div class="${properties.kcLabelWrapperClass!}">
<label for="user.attributes.affiliation_address" class="mdc-floating-label ${properties.kcLabelClass!}">Affiliation Address</label>
</div>
<div class="mdc-notched-outline">
<svg>
<path class="mdc-notched-outline__path"/>
</svg>
</div>
<div class="mdc-notched-outline__idle"></div>
</div>
<div class="${properties.kcFormGroupClass!} register-button-container">
<div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
<button class="mdc-button mdc-button--raised ${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonLargeClass!}" name="submitAction" type="submit" value="Save">
${msg("doSave")?no_esc}
</button>
</div>
</div>
</form>
</#if>
</@layout.registrationLayout>
\ No newline at end of file
<#import "template.ftl" as layout>
<@layout.registrationLayout displayMessage=false; section>
<#if section = "title">
${msg("errorTitle")?no_esc}
<#elseif section = "header">
${msg("errorTitleHtml")?no_esc}
<#elseif section = "form">
<div id="kc-error-message">
<p class="instruction">${message.summary}</p>
<#if client?? && client.baseUrl?has_content>
<p><a id="backToApplication" href="${client.baseUrl}">${msg("backToApplication")}</a></p>
</#if>
</div>
</#if>
</@layout.registrationLayout>
\ No newline at end of file
backToLogin=Back
errorTitle=We''re sorry...
errorTitleHtml=We''re <span style="font-weight: normal">sorry</span> ...
capsLockWarning=Caps Lock is On!
\ No newline at end of file
.alert {
position: relative;
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.125rem;
}
.alert-heading {
color: inherit;
}
.alert-link {
font-weight: 700;
}
.alert-dismissible {
padding-right: 4rem;
}
.alert-dismissible .close {
position: absolute;
top: 0;
right: 0;
padding: 0.75rem 1.25rem;
color: inherit;
}
.alert-primary {
color: #004e47;
background-color: #cceae7;
border-color: #b8e2de;
}
.alert-primary hr {
border-top-color: #a6dbd6;
}
.alert-primary .alert-link {
color: #001b19;
}
.alert-secondary {
color: #383d41;
background-color: #e2e3e5;
border-color: #d6d8db;
}
.alert-secondary hr {
border-top-color: #c8cbcf;
}
.alert-secondary .alert-link {
color: #202326;
}
.alert-success {
color: #285b2a;
background-color: #dbefdc;
border-color: #cde9ce;
}
.alert-success hr {
border-top-color: #bbe1bd;
}
.alert-success .alert-link {
color: #18381a;
}
.alert-info {
color: #02587f;
background-color: #cdeefd;
border-color: #b8e7fc;
}
.alert-info hr {
border-top-color: #a0dffb;
}
.alert-info .alert-link {
color: #01354d;
}
.alert-warning {
color: #852d12;
background-color: #ffddd3;
border-color: #ffd0c1;
}
.alert-warning hr {
border-top-color: #ffbda8;
}
.alert-warning .alert-link {
color: #581e0c;
}
.alert-danger, .alert-error {
color: #7f231c;
background-color: #fdd9d7;
border-color: #fccac7;
}
.alert-danger hr, .alert-error hr {
border-top-color: #fbb3af;
}
.alert-danger .alert-link, .alert-error .alert-link {
color: #551713;
}
.alert-light {
color: #7f7f7f;
background-color: #fdfdfd;
border-color: #fcfcfc;
}
.alert-light hr {
border-top-color: #efefef;
}
.alert-light .alert-link {
color: #666;
}
.alert-dark {
color: #222;
background-color: #d9d9d9;
border-color: #cacaca;
}
.alert-dark hr {
border-top-color: #bdbdbd;
}
.alert-dark .alert-link {
color: #090909;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
@import url('https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');
body {
background: #fafafa;
font-family: 'Roboto', sans-serif;
}
.title {
margin-bottom: 15px;
}
/* without this, the fields all expand
when the MDC JavaScript is run. */
.mdc-text-field {
margin-top: 16px;
}
#kc-header,
#kc-content {
margin-left: auto;
margin-right: auto;
}
#kc-header {
width: 90%;
font-size: 35px;
text-align: center;
margin-bottom: 25px;
font-weight: 300;
margin-top: 7%;
color: rgb(68, 68, 68);
}
#kc-content {
background: white;
padding: 20px;
box-shadow: 0 5px 6px -3px rgba(0, 0, 0, 0.2),
0 9px 12px 1px rgba(0, 0, 0, 0.14), 0 3px 16px 2px rgba(0, 0, 0, 0.12);
}
#kc-reset-password-form #kc-form-options {
float: left;
}
#kc-reset-password-form #kc-form-buttons {
float: right;
}
#kc-register-form #kc-form-options {
float: left;
}
#kc-register-form #kc-form-buttons {
float: right;
}
.clearfix {
float: none;
clear: both;
}
hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid rgba(0, 0, 0, 0.24);
}
@media (max-width: 768px) {
#kc-content {
width: 90%;
}
}
@media (min-width: 769px) {
#kc-content {
width: 560px;
}
}
.mdc-text-field {
width: 100%;
}
#kc-form-login #kc-form-options {
margin-top: 15px;
}
#kc-login {
float: right;
}
#kc-error-message p {
margin: 0;
}
.remember-me-checkbox {
float: left;
}
.register .register-field {
margin-bottom: 15px;
}
.register .register-button-container {
margin-top: 20px;
}
.reset-password .reset-password-field {
margin-bottom: 15px;
}
.update-password .update-password-field {
margin-bottom: 15px;
}
.update-password .update-password-button-container {
margin-top: 20px;
}
.config-totp .config-totp-button-container {
margin-top: 15px;
}
.totp .totp-button-container {
margin-top: 15px;
}
.update-profile .update-profile-field {
margin-top: 15px;
}
.update-profile .update-profile-button-container {
margin-top: 20px;
}
.template .language-picker {
position: relative;
margin: 0 auto;
margin-top: 30px;
margin-bottom: 20px;
width: 195px;
}
.template .language-picker .language-icon {
float: left;
color: rgba(0, 0, 0, 0.54);
}
.template .language-picker .mdc-select {
float: right;
margin-top: -25px;
}
.template .language-picker .mdc-select option {
font-weight: normal;
display: block;
white-space: pre;
min-height: 1.2em;
padding: 0px 2px 1px;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
window.onload = function() {
// add ripple effect to all material buttons on the page
document.querySelectorAll('.mdc-button').forEach(function(e) {
mdc.ripple.MDCRipple.attachTo(e);
});
// initialize all text fields
document.querySelectorAll('.mdc-text-field').forEach(function(e) {
new mdc.textField.MDCTextField(e);
});
// initialize all icons
document.querySelectorAll('.mdc-text-field__icon').forEach(function(e) {
new mdc.textField.MDCTextFieldIcon(e);
});
// initialize the language select box
var select = new mdc.select.MDCSelect(
document.querySelector('.language-picker .mdc-select')
);
select.listen('change', function() {
var redirectUrl = document.querySelector('#language-picker-dropdown')
.value;
window.location.href = redirectUrl;
});
};
// Taken from https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
// Allows for document.querySelectorAll('.selector').forEach(...)
if (window.NodeList && !NodeList.prototype.forEach) {
NodeList.prototype.forEach = function (callback, thisArg) {
thisArg = thisArg || window;
for (var i = 0; i < this.length; i++) {
callback.call(thisArg, this[i], i, this);
}
};
}
\ No newline at end of file
{
"name": "material-keycloak-theme-resources",
"version": "0.0.0",
"private": true
}
<#macro registrationLayout bodyClass="" displayInfo=false displayMessage=true>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" class="${properties.kcHtmlClass!}">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="robots" content="noindex, nofollow">
<meta name="viewport" content="width=device-width,initial-scale=1">
<#if properties.meta?has_content>
<#list properties.meta?split(' ') as meta>
<meta name="${meta?split('==')[0]}" content="${meta?split('==')[1]}"/>
</#list>
</#if>
<title><#nested "title"></title>
<link rel="shortcut icon" href="${url.resourcesPath}/img/favicon.ico" />
<#if properties.styles?has_content>
<#list properties.styles?split(' ') as style>
<link href="${url.resourcesPath}/${style}" rel="stylesheet" />
</#list>
</#if>
<#if properties.scripts?has_content>
<#list properties.scripts?split(' ') as script>
<script src="${url.resourcesPath}/${script}" type="text/javascript"></script>
</#list>
</#if>
<#if scripts??>
<#list scripts as script>
<script src="${script}" type="text/javascript"></script>
</#list>
</#if>
</head>
<body class="${properties.kcBodyClass!} template">
<div id="kc-logo"><a href="${properties.kcLogoLink!'#'}"><div id="kc-logo-wrapper"></div></a></div>
<div id="kc-container" class="${properties.kcContainerClass!}">
<div id="kc-container-wrapper" class="${properties.kcContainerWrapperClass!}">
<div id="kc-header" class="${properties.kcHeaderClass!}">
<div id="kc-header-wrapper" class="${properties.kcHeaderWrapperClass!}"><#nested "header"></div>
</div>
<div id="kc-content" class="mdc-card ${properties.kcContentClass!}">
<div id="kc-content-wrapper" class="${properties.kcContentWrapperClass!}">
<#if displayMessage && message?has_content>
<div class="${properties.kcFeedbackAreaClass!}">
<div class="alert alert-${message.type}">
<#if message.type = 'success'><span class="${properties.kcFeedbackSuccessIcon!}"></span></#if>
<#if message.type = 'warning'><span class="${properties.kcFeedbackWarningIcon!}"></span></#if>
<#if message.type = 'error'><span class="${properties.kcFeedbackErrorIcon!}"></span></#if>
<#if message.type = 'info'><span class="${properties.kcFeedbackInfoIcon!}"></span></#if>
<span class="kc-feedback-text">${message.summary}</span>
</div>
</div>
</#if>
<div id="kc-form" class="${properties.kcFormAreaClass!}">
<div id="kc-form-wrapper" class="${properties.kcFormAreaWrapperClass!}">
<#nested "form">
</div>
</div>
<#if displayInfo>
<div id="kc-info" class="${properties.kcInfoAreaClass!}">
<div id="kc-info-wrapper" class="${properties.kcInfoAreaWrapperClass!}">
<#nested "info">
</div>
</div>
</#if>
</div>
</div>
<#if realm.internationalizationEnabled>
<div id="kc-locale" class="${properties.kcLocaleClass!}">
<div id="kc-locale-wrapper" class="${properties.kcLocaleWrapperClass!}">
<div class="kc-dropdown language-picker" id="kc-locale-dropdown">
<i class="language-icon material-icons mdc-text-field__icon" tabindex="-1" role="button">language</i>
<div class="mdc-select">
<select id="language-picker-dropdown" class="mdc-select__native-control">
<option value="" disabled></option>
<#list locale.supported as l>
<#if l.label = locale.current>
<option value="" selected>${l.label}</option>
<#else>
<option value="${l.url}">${l.label}</option>
</#if>
</#list>
</select>
<#-- <label class="mdc-floating-label mdc-floating-label--float-above">Language!</label> -->
<div class="mdc-line-ripple"></div>
</div>
<#-- <div class="form-inline">