added admin container

root 2021-05-19 19:19:16 +02:00
parent da162f0b00
commit 7a8217ed21
41 changed files with 1428 additions and 7 deletions

View File

@ -33,15 +33,20 @@ environment:
echo "CUSTOM_PATH=$(CUSTOM_PATH)" >> isard-sso/docker-compose-parts/.env
echo "BUILD_ROOT_PATH=$(CUSTOM_PATH)/isard-sso" >> isard-sso/docker-compose-parts/.env
cp digitaldemocratic.conf docker-compose-parts/.env
echo "BUILD_ROOT_PATH=$(CUSTOM_PATH)" >> docker-compose-parts/.env
build: environment
docker-compose -f docker-compose-parts/backup.yml \
-f docker-compose-parts/admin.yml \
config > dd.yml
docker-compose -f isard-sso/docker-compose-parts/haproxy.yml \
-f isard-sso/docker-compose-parts/api.yml \
-f isard-sso/docker-compose-parts/freeipa.yml \
-f isard-sso/docker-compose-parts/keycloak.yml \
-f isard-sso/docker-compose-parts/avatars.yml \
-f isard-apps/docker/postgresql/postgresql.yml \
-f isard-sso/docker-compose-parts/backup.yml \
config > sso.yml
#-f isard-sso/docker-compose-parts/freeipa.yml
docker-compose -f isard-apps/docker/moodle/moodle.yml \
-f isard-apps/docker/nextcloud/nextcloud.yml \
-f isard-apps/docker/wordpress/wordpress.yml \
@ -52,8 +57,8 @@ build: environment
-f isard-apps/docker/mariadb/mariadb.yml \
-f isard-apps/docker/network.yml \
config > apps.yml
docker-compose -f sso.yml -f apps.yml config > docker-compose.yml
rm sso.yml apps.yml
docker-compose -f dd.yml -f sso.yml -f apps.yml config > docker-compose.yml
rm dd.yml sso.yml apps.yml
docker-compose build
up: build

36
admin/docker/Dockerfile Normal file
View File

@ -0,0 +1,36 @@
FROM alpine:3.12.0 as production
MAINTAINER isard <info@isardvdi.com>
RUN apk add python3 py3-pip py3-pyldap~=3.2.0
RUN pip3 install --upgrade pip
RUN apk add --no-cache --virtual .build_deps \
build-base \
python3-dev \
libffi-dev \
py3-yaml
COPY admin/docker/requirements.pip3 /requirements.pip3
RUN pip3 install --no-cache-dir -r requirements.pip3
RUN apk del .build_deps
RUN apk add curl
# SSH configuration
ARG SSH_ROOT_PWD
RUN apk add openssh
RUN echo "root:$SSH_ROOT_PWD" |chpasswd
RUN sed -i \
-e 's|[#]*PermitRootLogin prohibit-password|PermitRootLogin yes|g' \
-e 's|[#]*PasswordAuthentication yes|PasswordAuthentication yes|g' \
-e 's|[#]*ChallengeResponseAuthentication yes|ChallengeResponseAuthentication yes|g' \
-e 's|[#]*UsePAM yes|UsePAM yes|g' \
-e 's|[#]#Port 22|Port 22|g' \
/etc/ssh/sshd_config
COPY admin/src /admin
COPY admin/docker/docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
#EXPOSE 7039
WORKDIR /admin
CMD [ "python3", "start.py" ]

View File

@ -0,0 +1,5 @@
#!/bin/sh
ssh-keygen -A
/usr/sbin/sshd -D -e -f /etc/ssh/sshd_config
# cd /admin
# python3 start.py

View File

@ -0,0 +1,15 @@
bcrypt==3.1.7
cffi==1.14.0
click==7.1.2
Flask==1.1.2
Flask-Login==0.5.0
gevent==20.6.0
greenlet==0.4.16
itsdangerous==1.1.0
Jinja2==2.11.2
MarkupSafe==1.1.1
pycparser==2.20
six==1.15.0
Werkzeug==1.0.1
zope.event==4.4
zope.interface==5.1.0

65
admin/src/api/__init__.py Normal file
View File

@ -0,0 +1,65 @@
#!flask/bin/python
# coding=utf-8
import os
import logging as log
from flask import Flask, send_from_directory, render_template
app = Flask(__name__, static_url_path='')
app = Flask(__name__, template_folder='static/templates')
app.url_map.strict_slashes = False
'''
App secret key for encrypting cookies
You can generate one with:
import os
os.urandom(24)
And paste it here.
'''
app.secret_key = "Change this key!//\xf7\x83\xbe\x17\xfa\xa3zT\n\\]m\xa6\x8bF\xdd\r\xf7\x9e\x1d\x1f\x14'"
print('Starting isard-sso api...')
from api.lib.load_config import loadConfig
try:
loadConfig(app)
except:
print('Could not get environment variables...')
'''
Debug should be removed on production!
'''
if app.debug:
log.warning('Debug mode: {}'.format(app.debug))
else:
log.info('Debug mode: {}'.format(app.debug))
'''
Serve static files
'''
@app.route('/templates/<path:path>')
def send_templates(path):
return send_from_directory(os.path.join(app.root_path, 'static/templates'), path)
# @app.route('/static/<path:path>')
# def send_static_js(path):
# return send_from_directory(os.path.join(app.root_path, 'static'), path)
# @app.errorhandler(404)
# def not_found_error(error):
# return render_template('page_404.html'), 404
# @app.errorhandler(500)
# def internal_error(error):
# return render_template('page_500.html'), 500
'''
Import all views
'''
from .views import MenuViews

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,18 @@
#!/usr/bin/env python
# coding=utf-8
from api import app
import os, sys
import logging as log
import traceback
class loadConfig():
def __init__(self, app=None):
try:
app.config.setdefault('DOMAIN', os.environ['DOMAIN'])
except Exception as e:
log.error(traceback.format_exc())
raise

65
admin/src/api/lib/menu.py Normal file
View File

@ -0,0 +1,65 @@
#!/usr/bin/env python
# coding=utf-8
# Copyright 2017 the Isard-vdi project authors:
# Josep Maria Viñolas Auquer
# Alberto Larraz Dalmases
# License: AGPLv3
import time
from api import app as application
from datetime import datetime, timedelta
import pprint
import logging
import traceback
import yaml, json
from jinja2 import Environment, FileSystemLoader
class Menu():
def __init__(self):
self.menudict=self.gen_header()
pprint.pprint(self.menudict)
self.write_headers()
None
def gen_header(self):
with open(r'system.yaml') as yml:
system=yaml.load(yml, Loader=yaml.FullLoader)
apps_internal = []
for app in system['apps_internal']:
app['href']='https://'+app['subdomain']+'.'+application.config['DOMAIN']+app['href']
del app['subdomain']
apps_internal.append(app)
with open(r'custom.yaml') as yml:
custom=yaml.load(yml, Loader=yaml.FullLoader)
custom['background_login']='https://api.'+application.config['DOMAIN']+custom['background_login']
custom['logo']='https://api.'+application.config['DOMAIN']+custom['logo']
menudict={**custom,**{'apps_internal':apps_internal}}
menudict['user']={}
menudict['user']['account']='https://sso.'+application.config['DOMAIN']+system['user']['account']
menudict['user']['avatar']='https://sso.'+application.config['DOMAIN']+system['user']['avatar']
menudict['user']['password']='https://sso.'+application.config['DOMAIN']+system['user']['password']
return menudict
def write_headers(self):
env = Environment(loader=FileSystemLoader('api/static/_templates'))
template = env.get_template('apps.html')
output_from_parsed_template = template.render(data=self.menudict)
print(output_from_parsed_template)
with open("api/static/templates/header.html", "w") as fh:
fh.write(output_from_parsed_template)
with open("api/static/templates/header_nextcloud.html", "w") as fh:
fh.write(output_from_parsed_template)
with open("api/static/templates/header_nextcloud.html", "a") as fh:
with open("api/static/_templates/nextcloud.html", "r") as nextcloud:
fh.write(nextcloud.read())
with open("api/static/templates/header.json", "w") as fh:
fh.write(json.dumps(self.menudict))
def get_header(self):
return self.menudict
# with open('menu.yaml', 'w') as yml:
# print(yaml.dump(header, yml, allow_unicode=True))

View File

@ -0,0 +1,45 @@
<div id="navbar-menu-apps">
<div id="menu-apps-btn">
<button type="button" id="dropdownMenuAppsButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<svg id="Menú_Apps" data-name="Menú Apps" xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 26 26">
<rect id="Rectángulo_2" data-name="Rectángulo 2" width="6" height="6" fill="#262626"/>
<rect id="Rectángulo_1447" data-name="Rectángulo 1447" width="6" height="6" transform="translate(0 10)" fill="#262626"/>
<rect id="Rectángulo_1450" data-name="Rectángulo 1450" width="6" height="6" transform="translate(0 20)" fill="#262626"/>
<rect id="Rectángulo_1440" data-name="Rectángulo 1440" width="6" height="6" transform="translate(10)" fill="#262626"/>
<rect id="Rectángulo_1446" data-name="Rectángulo 1446" width="6" height="6" transform="translate(10 10)" fill="#262626"/>
<rect id="Rectángulo_1449" data-name="Rectángulo 1449" width="6" height="6" transform="translate(10 20)" fill="#262626"/>
<rect id="Rectángulo_1441" data-name="Rectángulo 1441" width="6" height="6" transform="translate(20)" fill="#262626"/>
<rect id="Rectángulo_1445" data-name="Rectángulo 1445" width="6" height="6" transform="translate(20 10)" fill="#262626"/>
<rect id="Rectángulo_1448" data-name="Rectángulo 1448" width="6" height="6" transform="translate(20 20)" fill="#262626"/>
</svg>
</button>
<div id="dropdownMenuApps" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton" >
<ul id="app-aapps">
{% for item in data.apps_internal %}
<li class="app {{ item.shorname }}">
<a href="{{ item.href }}" class="app-link" target="_blank">
<div class="icon {{ item.shorname }}">
<i class="{{ item.icon }}" aria-hidden="true"></i>
</div>
<div class="text">{{ item.name }}</div>
</a>
</li>
{% endfor %}
</ul>
<ul id="app-external" class="external-links">
{% for item in data.apps_external %}
<li class="app {{ item.shorname }}">
<a href="{{ item.href }}" class="app-link" target="_blank">
<div class="icon {{ item.shorname }}">
<i class="{{ item.icon }}" aria-hidden="true"></i>
</div>
<div class="text">{{ item.name }}</div>
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>

View File

@ -0,0 +1,46 @@
<div id="navbar-nextcloud" class="header-right">
<div id="unified-search"></div>
<div id="notifications"></div>
<div id="contactsmenu">
<div class="icon-contacts menutoggle" tabindex="0" role="button"
aria-haspopup="true" aria-controls="contactsmenu-menu" aria-expanded="false">
<span class="hidden-visually"><?php p($l->t('Contacts'));?></span>
</div>
<div id="contactsmenu-menu" class="menu"
aria-label="<?php p($l->t('Contacts menu'));?>"></div>
</div>
<div id="settings">
<div id="expand" tabindex="0" role="button" class="menutoggle"
aria-label="<?php p($l->t('Settings'));?>"
aria-haspopup="true" aria-controls="expanddiv" aria-expanded="false">
<div class="avatardiv<?php if ($_['userAvatarSet']) {
print_unescaped(' avatardiv-shown');
} else {
print_unescaped('" style="display: none');
} ?>">
<?php if ($_['userAvatarSet']): ?>
<img alt="" width="32" height="32"
src="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 32, 'v' => $_['userAvatarVersion']]));?>"
srcset="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 64, 'v' => $_['userAvatarVersion']]));?> 2x, <?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 128, 'v' => $_['userAvatarVersion']]));?> 4x"
>
<?php endif; ?>
</div>
<div id="expandDisplayName" class="icon-settings-white"></div>
</div>
<nav class="settings-menu" id="expanddiv" style="display:none;"
aria-label="<?php p($l->t('Settings menu'));?>">
<ul>
<?php foreach ($_['settingsnavigation'] as $entry):?>
<li data-id="<?php p($entry['id']); ?>">
<a href="<?php print_unescaped($entry['href']); ?>"
<?php if ($entry["active"]): ?> class="active"<?php endif; ?>>
<img alt="" src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>">
<?php p($entry['name']) ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</nav>
</div>
</div>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,196 @@
#body-user, #body-settings, #body-public {
font-family: 'Montserrat', sans-serif;
color: #262626;
}
#body-user #app-dashboard>h2, #body-settings #app-dashboard>h2, #body-public #app-dashboard>h2 {
color: #262626;
}
#body-user header#header, #body-settings header#header, #body-public header#header {
background-color: white !important;
height: 74px ;
box-shadow: 0 2px 4px #00000014;
border-bottom: 1px solid #262626;
background-image: inherit;
}
#theming-preview-logo, #header #nextcloud {
padding-left: 10px;
}
#header #unified-search svg {
fill: #262626;
width: 35px;
height: 35px;
}
#header .notifications .notifications-button img.svg {
background-color: #262626;
padding: 5px;
border-radius: 18px;
height: 23px;
width: 23px;
margin-left: 10px;
}
#header #contactsmenu {
display: flex;
align-items: center;
}
#header #contactsmenu .icon-contacts {
background-color: #262626;
padding: 5px;
border-radius: 18px;
height: 23px;
width: 23px;
opacity: 1;
margin-left: 10px;
}
#header #settings #expand .avatardiv {
height: 35px;
width: 35px;
}
#header #settings #expand .avatardiv img {
height: 35px;
width: 35px;
margin-left: 10px;
}
#header #unified-search a.header-menu__trigger {
opacity: 1;
}
#header #unified-search a.header-menu__trigger .magnify-icon {
width: 35px;
height: 35px;
}
#body-user div#content, #body-settings div#content, #body-public div#content {
padding-top: 75px;
}
#body-user div#content div#app-dashboard, #body-settings div#content div#app-dashboard, #body-public div#content div#app-dashboard {
background-image: none !important;
background-color: #F0F0F0!important;
}
#body-user div#app-navigation, #body-settings div#app-navigation, #body-public div#app-navigation {
top: 75px;
height: calc(100% - 75px);
color: #262626 !important;
}
#header .header-menu__wrapper[data-v-a58f012a] {
top: 65px;
}
#header #navbar-menu-apps #menu-apps-btn #dropdownMenuAppsButton {
cursor: pointer;
border: none;
background-color: inherit;
padding: 4px;
}
#header div#navbar-menu-apps {
display: flex;
align-items: center;
}
#header #navbar-menu-apps #menu-apps-btn {
margin-right: 20px;
cursor: pointer;
position: relative;
}
#header #navbar-menu-apps #menu-apps-btn #dropdownMenuAppsButton {
cursor: pointer;
border: none;
background-color: inherit;
padding: 4px;
}
#header #navbar-menu-apps .dropdown-menu {
display: none;
position: absolute;
border: 1px solid rgba(0,0,0,.15);
border-radius: 5px;
box-shadow: rgb(0 0 0 / 20%) 0 3px 8px;
margin-top: 15px;
padding: 10px;
max-height: 500px;
overflow-y: scroll;
z-index: 2000;
background-color: white;
top: 33px;
right: -14px;
left: auto;
}
#header #navbar-menu-apps .dropdown-menu ul {
list-style: none;
display: grid;
flex-wrap: wrap;
padding: 15px 2px 0 0;
margin-bottom: 0;
grid-template-columns: 82px 82px 82px;
grid-gap: 12px 2px;
}
#header #navbar-menu-apps .dropdown-menu ul#app-admin {
border-bottom: 1px solid #D9D9D9;
padding-bottom: 4px;
margin-bottom: 6px;
}
#header #navbar-menu-apps .dropdown-menu ul#app-external {
border-top: 1px solid #D9D9D9;
padding-top: 20px;
margin-top: 8px;
}
#header #navbar-menu-apps .dropdown-menu ul li.app a.app-link {
display: flex;
flex-direction: column;
align-items: center;
justify-content: start;
text-align: center;
color: #262626;
text-decoration: none;
}
#header #navbar-menu-apps .dropdown-menu ul li.app a.app-link .icon {
width: 40px;
height: 40px;
background-color: #d5045c;
border-radius: .25rem;
margin-right: 0;
display: flex;
align-items: center;
justify-content: center;
}
#header #navbar-menu-apps .dropdown-menu ul li.app a.app-link .text {
text-align: center;
margin-top: 4px;
height: 26px;
font-size: 13px;
line-height: 15px;
overflow-wrap: anywhere;
}
#header #navbar-menu-apps .dropdown-menu ul li.app a.app-link .icon i {
color: #fff;
font-size: 19px;
}
div#content-vue {
padding-top: 75px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1,5 @@
jQuery(document).ready(function() {
$('#dropdownMenuAppsButton').click(function (e) {
$('#dropdownMenuApps').toggle();
});
});

View File

View File

@ -0,0 +1,171 @@
<div id="navbar-menu-apps">
<div id="menu-apps-btn">
<button type="button" id="dropdownMenuAppsButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<svg id="Menú_Apps" data-name="Menú Apps" xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 26 26">
<rect id="Rectángulo_2" data-name="Rectángulo 2" width="6" height="6" fill="#262626"/>
<rect id="Rectángulo_1447" data-name="Rectángulo 1447" width="6" height="6" transform="translate(0 10)" fill="#262626"/>
<rect id="Rectángulo_1450" data-name="Rectángulo 1450" width="6" height="6" transform="translate(0 20)" fill="#262626"/>
<rect id="Rectángulo_1440" data-name="Rectángulo 1440" width="6" height="6" transform="translate(10)" fill="#262626"/>
<rect id="Rectángulo_1446" data-name="Rectángulo 1446" width="6" height="6" transform="translate(10 10)" fill="#262626"/>
<rect id="Rectángulo_1449" data-name="Rectángulo 1449" width="6" height="6" transform="translate(10 20)" fill="#262626"/>
<rect id="Rectángulo_1441" data-name="Rectángulo 1441" width="6" height="6" transform="translate(20)" fill="#262626"/>
<rect id="Rectángulo_1445" data-name="Rectángulo 1445" width="6" height="6" transform="translate(20 10)" fill="#262626"/>
<rect id="Rectángulo_1448" data-name="Rectángulo 1448" width="6" height="6" transform="translate(20 20)" fill="#262626"/>
</svg>
</button>
<div id="dropdownMenuApps" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton" >
<ul id="app-aapps">
<li class="app ">
<a href="https://nextcloud.santantoni.duckdns.org/" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-cloud" aria-hidden="true"></i>
</div>
<div class="text">Núvol + crear arxius</div>
</a>
</li>
<li class="app ">
<a href="https://nextcloud.santantoni.duckdns.org/apps/mail/setup" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-envelope-o" aria-hidden="true"></i>
</div>
<div class="text">Correu</div>
</a>
</li>
<li class="app ">
<a href="https://pad.santantoni.duckdns.org/" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-file-text-o" aria-hidden="true"></i>
</div>
<div class="text">Pads</div>
</a>
</li>
<li class="app ">
<a href="https://nextcloud.santantoni.duckdns.org/apps/forms" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-check-square-o" aria-hidden="true"></i>
</div>
<div class="text">Formularis</div>
</a>
</li>
<li class="app ">
<a href="https://nextcloud.santantoni.duckdns.org/apps/polls" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-bar-chart" aria-hidden="true"></i>
</div>
<div class="text">Enquestes</div>
</a>
</li>
<li class="app ">
<a href="https://nextcloud.santantoni.duckdns.org/apps/spreed" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-commenting-o" aria-hidden="true"></i>
</div>
<div class="text">Xat</div>
</a>
</li>
<li class="app ">
<a href="https://nextcloud.santantoni.duckdns.org/apps/calendar" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-calendar" aria-hidden="true"></i>
</div>
<div class="text">Calendari</div>
</a>
</li>
<li class="app ">
<a href="https://wp.santantoni.duckdns.org/wp-login.php?saml_sso" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-rss" aria-hidden="true"></i>
</div>
<div class="text">Webs</div>
</a>
</li>
<li class="app ">
<a href="https://nextcloud.santantoni.duckdns.org/apps/bbb" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-video-camera" aria-hidden="true"></i>
</div>
<div class="text">Reunions BBB</div>
</a>
</li>
<li class="app ">
<a href="https://nextcloud.santantoni.duckdns.org/apps/photos" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-file-image-o" aria-hidden="true"></i>
</div>
<div class="text">Fotos</div>
</a>
</li>
</ul>
<ul id="app-external" class="external-links">
<li class="app ">
<a href="https://myweb" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-university" aria-hidden="true"></i>
</div>
<div class="text">Escola Web</div>
</a>
</li>
<li class="app ">
<a href="https://myvideos" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-youtube-play" aria-hidden="true"></i>
</div>
<div class="text">Youtube</div>
</a>
</li>
<li class="app ">
<a href="https://mydictionary" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-book" aria-hidden="true"></i>
</div>
<div class="text">Diccionari</div>
</a>
</li>
<li class="app ">
<a href="http://meet.jit.si" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-video-camera" aria-hidden="true"></i>
</div>
<div class="text">Reunions Jitsi</div>
</a>
</li>
<li class="app ">
<a href="https://www.duckduckgo.com" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-search" aria-hidden="true"></i>
</div>
<div class="text">Cercar</div>
</a>
</li>
<li class="app ">
<a href="https://www.openstreetmap.org" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-map-marker" aria-hidden="true"></i>
</div>
<div class="text">Maps</div>
</a>
</li>
</ul>
</div>
</div>
</div>

View File

@ -0,0 +1 @@
{"background_login": "https://api.santantoni.duckdns.org/img/background.png", "colours": {"background": "#F0F0F0", "primary": "#92AE01", "secondary": "#FFFFFF"}, "logo": "https://api.santantoni.duckdns.org/img/logo.png", "apps_external": [{"href": "https://myweb", "icon": "fa fa-university", "name": "Escola Web", "shortname": "web"}, {"href": "https://myvideos", "icon": "fa fa-youtube-play", "name": "Youtube", "shortname": "youtube"}, {"href": "https://mydictionary", "icon": "fa fa-book", "name": "Diccionari", "shortname": "diccionari"}, {"href": "http://meet.jit.si", "icon": "fa fa-video-camera", "name": "Reunions Jitsi", "shortname": "jitsi"}, {"href": "https://www.duckduckgo.com", "icon": "fa fa-search", "name": "Cercar", "shortname": "search"}, {"href": "https://www.openstreetmap.org", "icon": "fa fa-map-marker", "name": "Maps", "shortname": "maps"}], "apps_internal": [{"href": "https://nextcloud.santantoni.duckdns.org/", "icon": "fa fa-cloud", "name": "N\u00favol + crear arxius", "shortname": "cloud"}, {"href": "https://nextcloud.santantoni.duckdns.org/apps/mail/setup", "icon": "fa fa-envelope-o", "name": "Correu", "shortname": "email"}, {"href": "https://pad.santantoni.duckdns.org/", "icon": "fa fa-file-text-o", "name": "Pads", "shortname": "pads"}, {"href": "https://nextcloud.santantoni.duckdns.org/apps/forms", "icon": "fa fa-check-square-o", "name": "Formularis", "shortname": "forms"}, {"href": "https://nextcloud.santantoni.duckdns.org/apps/polls", "icon": "fa fa-bar-chart", "name": "Enquestes", "shortname": "feedback"}, {"href": "https://nextcloud.santantoni.duckdns.org/apps/spreed", "icon": "fa fa-commenting-o", "name": "Xat", "shortname": "chat"}, {"href": "https://nextcloud.santantoni.duckdns.org/apps/calendar", "icon": "fa fa-calendar", "name": "Calendari", "shortname": "schedule"}, {"href": "https://wp.santantoni.duckdns.org/wp-login.php?saml_sso", "icon": "fa fa-rss", "name": "Webs", "shortname": "webs"}, {"href": "https://nextcloud.santantoni.duckdns.org/apps/bbb", "icon": "fa fa-video-camera", "name": "Reunions BBB", "shortname": "meets_bbb"}, {"href": "https://nextcloud.santantoni.duckdns.org/apps/photos", "icon": "fa fa-file-image-o", "name": "Fotos", "shortname": "photos"}], "user": {"account": "https://sso.santantoni.duckdns.org/auth/realms/master/account", "avatar": "https://sso.santantoni.duckdns.org/auth/realms/master/avatar-provider", "password": "https://sso.santantoni.duckdns.org/auth/realms/master/password"}}

View File

@ -0,0 +1,171 @@
<div id="navbar-menu-apps">
<div id="menu-apps-btn">
<button type="button" id="dropdownMenuAppsButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<svg id="Menú_Apps" data-name="Menú Apps" xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 26 26">
<rect id="Rectángulo_2" data-name="Rectángulo 2" width="6" height="6" fill="#262626"/>
<rect id="Rectángulo_1447" data-name="Rectángulo 1447" width="6" height="6" transform="translate(0 10)" fill="#262626"/>
<rect id="Rectángulo_1450" data-name="Rectángulo 1450" width="6" height="6" transform="translate(0 20)" fill="#262626"/>
<rect id="Rectángulo_1440" data-name="Rectángulo 1440" width="6" height="6" transform="translate(10)" fill="#262626"/>
<rect id="Rectángulo_1446" data-name="Rectángulo 1446" width="6" height="6" transform="translate(10 10)" fill="#262626"/>
<rect id="Rectángulo_1449" data-name="Rectángulo 1449" width="6" height="6" transform="translate(10 20)" fill="#262626"/>
<rect id="Rectángulo_1441" data-name="Rectángulo 1441" width="6" height="6" transform="translate(20)" fill="#262626"/>
<rect id="Rectángulo_1445" data-name="Rectángulo 1445" width="6" height="6" transform="translate(20 10)" fill="#262626"/>
<rect id="Rectángulo_1448" data-name="Rectángulo 1448" width="6" height="6" transform="translate(20 20)" fill="#262626"/>
</svg>
</button>
<div id="dropdownMenuApps" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton" >
<ul id="app-aapps">
<li class="app ">
<a href="https://nextcloud.santantoni.duckdns.org/" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-cloud" aria-hidden="true"></i>
</div>
<div class="text">Núvol + crear arxius</div>
</a>
</li>
<li class="app ">
<a href="https://nextcloud.santantoni.duckdns.org/apps/mail/setup" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-envelope-o" aria-hidden="true"></i>
</div>
<div class="text">Correu</div>
</a>
</li>
<li class="app ">
<a href="https://pad.santantoni.duckdns.org/" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-file-text-o" aria-hidden="true"></i>
</div>
<div class="text">Pads</div>
</a>
</li>
<li class="app ">
<a href="https://nextcloud.santantoni.duckdns.org/apps/forms" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-check-square-o" aria-hidden="true"></i>
</div>
<div class="text">Formularis</div>
</a>
</li>
<li class="app ">
<a href="https://nextcloud.santantoni.duckdns.org/apps/polls" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-bar-chart" aria-hidden="true"></i>
</div>
<div class="text">Enquestes</div>
</a>
</li>
<li class="app ">
<a href="https://nextcloud.santantoni.duckdns.org/apps/spreed" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-commenting-o" aria-hidden="true"></i>
</div>
<div class="text">Xat</div>
</a>
</li>
<li class="app ">
<a href="https://nextcloud.santantoni.duckdns.org/apps/calendar" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-calendar" aria-hidden="true"></i>
</div>
<div class="text">Calendari</div>
</a>
</li>
<li class="app ">
<a href="https://wp.santantoni.duckdns.org/wp-login.php?saml_sso" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-rss" aria-hidden="true"></i>
</div>
<div class="text">Webs</div>
</a>
</li>
<li class="app ">
<a href="https://nextcloud.santantoni.duckdns.org/apps/bbb" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-video-camera" aria-hidden="true"></i>
</div>
<div class="text">Reunions BBB</div>
</a>
</li>
<li class="app ">
<a href="https://nextcloud.santantoni.duckdns.org/apps/photos" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-file-image-o" aria-hidden="true"></i>
</div>
<div class="text">Fotos</div>
</a>
</li>
</ul>
<ul id="app-external" class="external-links">
<li class="app ">
<a href="https://myweb" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-university" aria-hidden="true"></i>
</div>
<div class="text">Escola Web</div>
</a>
</li>
<li class="app ">
<a href="https://myvideos" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-youtube-play" aria-hidden="true"></i>
</div>
<div class="text">Youtube</div>
</a>
</li>
<li class="app ">
<a href="https://mydictionary" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-book" aria-hidden="true"></i>
</div>
<div class="text">Diccionari</div>
</a>
</li>
<li class="app ">
<a href="http://meet.jit.si" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-video-camera" aria-hidden="true"></i>
</div>
<div class="text">Reunions Jitsi</div>
</a>
</li>
<li class="app ">
<a href="https://www.duckduckgo.com" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-search" aria-hidden="true"></i>
</div>
<div class="text">Cercar</div>
</a>
</li>
<li class="app ">
<a href="https://www.openstreetmap.org" class="app-link" target="_blank">
<div class="icon ">
<i class="fa fa-map-marker" aria-hidden="true"></i>
</div>
<div class="text">Maps</div>
</a>
</li>
</ul>
</div>
</div>
</div>

View File

@ -0,0 +1,28 @@
#!flask/bin/python
# coding=utf-8
from api import app
import logging as log
import traceback
from uuid import uuid4
import time,json
import sys,os
from flask import render_template, Response, request, redirect, url_for, jsonify
from ..lib.menu import Menu
menu = Menu()
@app.route('/header/<format>', methods=['GET'])
@app.route('/header/<format>/<application>', methods=['GET'])
def api_v2_header(format,application=False):
if application == False:
if format == 'json':
if application == False:
return json.dumps(menu.get_header()), 200, {'Content-Type': 'application/json'}
if format == 'html':
if application == False:
return render_template('header.html')
if application == 'nextcloud':
return render_template('header_nextcloud.html')
if application == 'wordpress':
return render_template('header_wordpress.html')

View File

13
admin/src/start.py Normal file
View File

@ -0,0 +1,13 @@
#!flask/bin/python
# coding=utf-8
from gevent import monkey
monkey.patch_all()
import yaml
from api import app
# import pprint
# pprint.pprint(app.yaml)
if __name__ == '__main__':
app.run(host='0.0.0.0', port=9000, debug=False) #, logger=logger, engineio_logger=engineio_logger)

View File

@ -0,0 +1,55 @@
apps_internal:
- subdomain: nextcloud
href: /
icon: fa fa-cloud
name: Núvol + crear arxius
shortname: cloud
- subdomain: nextcloud
href: /apps/mail/setup
icon: fa fa-envelope-o
name: Correu
shortname: email
- subdomain: pad
href: /
icon: fa fa-file-text-o
name: Pads
shortname: pads
- subdomain: nextcloud
href: /apps/forms
icon: fa fa-check-square-o
name: Formularis
shortname: forms
- subdomain: nextcloud
href: /apps/polls
icon: fa fa-bar-chart
name: Enquestes
shortname: feedback
- subdomain: nextcloud
href: /apps/spreed
icon: fa fa-commenting-o
name: Xat
shortname: chat
- subdomain: nextcloud
href: /apps/calendar
icon: fa fa-calendar
name: Calendari
shortname: schedule
- subdomain: wp
href: /wp-login.php?saml_sso
icon: fa fa-rss
name: Webs
shortname: webs
- subdomain: nextcloud
href: /apps/bbb
icon: fa fa-video-camera
name: Reunions BBB
shortname: meets_bbb
- subdomain: nextcloud
href: /apps/photos
icon: fa fa-file-image-o
name: Fotos
shortname: photos
user:
account: /auth/realms/master/account
avatar: /auth/realms/master/avatar-provider
password: /auth/realms/master/password

View File

@ -6,11 +6,11 @@ docker exec -i isard-sso-keycloak sh -c '/opt/jboss/keycloak/bin/kcadm.sh \
config credentials --server http://localhost:8080/auth \
--realm master --user $KEYCLOAK_USER --password $KEYCLOAK_PASSWORD &> /dev/null && \
/opt/jboss/keycloak/bin/kcadm.sh \
get realms/DigitalDemocratic' > keycloak/realm.json
get realms/master' > keycloak/realm.json
echo "Dump realm.json"
docker exec -i isard-sso-keycloak sh -c '/opt/jboss/keycloak/bin/kcadm.sh \
config credentials --server http://localhost:8080/auth \
--realm master --user $KEYCLOAK_USER --password $KEYCLOAK_PASSWORD &> /dev/null && \
/opt/jboss/keycloak/bin/kcadm.sh \
get realms/DigitalDemocratic' > keycloak/realm.json
get realms/master' > keycloak/realm.json

80
docker-compose-parts/.env Normal file
View File

@ -0,0 +1,80 @@
## GLOBALS
TITLE="Digital Democratic"
DOMAIN=santantoni.duckdns.org
LETSENCRYPT_DNS=
LETSENCRYPT_EMAIL=
GANDI_KEY=
DB_FOLDER=/opt/digitaldemocratic/db
DATA_FOLDER=/opt/digitaldemocratic/data
SRC_FOLDER=/opt/digitaldemocratic/src
BACKUP_FOLDER=/opt/digitaldemocratic/backup
LANG=es_ES.UTF-8
LANGUAGE=es_ES:ca
SMTP_HOST=smtp.mymailserver.com
SMTP_PORT=587
SMTP_USER=your_email@mymailserver.com
SMTP_PASSWORD=SuperSecret
SMTP_PROTOCOL=tls
### FREEIPA (ipa)
###########################################################################
IPA_ADMIN_PWD=freeipafreeipa
### KEYCLOAK (sso)
###########################################################################
KEYCLOAK_USER=admin
KEYCLOAK_PASSWORD=keycloakkeycloak
KEYCLOAK_DB_ADDR=isard-apps-postgresql
KEYCLOAK_DB_DATABASE=keycloak
KEYCLOAK_DB_USER=keycloak
KEYCLOAK_DB_PASSWORD=keycloakkeycloak
### POSTGRES
###########################################################################
POSTGRES_PASSWORD=postgrespostgres
POSTGRES_USER=admin
## MARIADB ADMIN
###MARIADB_USER=root
MARIADB_PASSWORD=SuperSecret
## MOODLE
MOODLE_POSTGRES_USER=moodle
MOODLE_POSTGRES_PASSWORD=M00dl3
MOODLE_ADMIN_USER=admin
MOODLE_ADMIN_PASSWORD=M00dl3
MOODLE_SITENAME="Digital Democratic"
MOODLE_EMAIL=moodle-info@mymailserver.com
MOODLE_MAIL_NOREPLY_ADDRESS=noreply@mymailserver.com
MOODLE_MAIL_PREFIX=[moodle]
## NEXTCLOUD
NEXTCLOUD_POSTGRES_USER=nextcloud
NEXTCLOUD_POSTGRES_PASSWORD=N3xtcl0ud
NEXTCLOUD_ADMIN_USER=admin
NEXTCLOUD_ADMIN_PASSWORD=N3xtcl0ud
## ETHERPAD
ETHERPAD_POSTGRES_USER=etherpad
ETHERPAD_POSTGRES_PASSWORD=3th3rpad
ETHERPAD_ADMIN_USER=admin
ETHERPAD_ADMIN_PASSWORD=SuperSecret
#ETHERPAD_API_KEY=NotImplemented
## WORDPRESS
WORDPRESS_MARIADB_USER=wordpress
WORDPRESS_MARIADB_PASSWORD=W0rdpr3ss
WORDPRESS_ADMIN_USER=admin
WORDPRESS_ADMIN_PASSWORD=W0rdpr3ss
BUILD_ROOT_PATH=/root/gitlab/dd/digitaldemocratic

@ -1 +1 @@
Subproject commit 68bb6874f56c1638848ad631dd8df54eb133f699
Subproject commit 70e3946ac2306677be4a6410d7fff420f0304927

View File

@ -0,0 +1,286 @@
[ {
"id" : "a92d5417-92b6-4678-9cb9-51bc0edcee8c",
"clientId" : "https://moodle.[[DOMAIN]]/auth/saml2/sp/metadata.php",
"surrogateAuthRequired" : false,
"enabled" : true,
"alwaysDisplayInConsole" : false,
"clientAuthenticatorType" : "client-secret",
"redirectUris" : [ "https://moodle.[[DOMAIN]]/auth/saml2/sp/saml2-acs.php/moodle.[[DOMAIN]]" ],
"webOrigins" : [ "https://moodle.[[DOMAIN]]" ],
"notBefore" : 0,
"bearerOnly" : false,
"consentRequired" : false,
"standardFlowEnabled" : true,
"implicitFlowEnabled" : false,
"directAccessGrantsEnabled" : false,
"serviceAccountsEnabled" : false,
"publicClient" : false,
"frontchannelLogout" : true,
"protocol" : "saml",
"attributes" : {
"saml.force.post.binding" : "true",
"saml.encrypt" : "true",
"saml_assertion_consumer_url_post" : "https://moodle.[[DOMAIN]]/auth/saml2/sp/saml2-acs.php/moodle.[[DOMAIN]]",
"saml.server.signature" : "true",
"saml.server.signature.keyinfo.ext" : "false",
"saml.signing.certificate" : "[[SIGNING_CERTIFICATE]]",
"saml_single_logout_service_url_redirect" : "https://moodle.[[DOMAIN]]/auth/saml2/sp/saml2-logout.php/moodle.[[DOMAIN]]",
"saml.signature.algorithm" : "RSA_SHA256",
"saml_force_name_id_format" : "false",
"saml.client.signature" : "true",
"saml.encryption.certificate" : "[[ENCRYPTION_CERTIFICATE]]",
"saml.authnstatement" : "true",
"saml_name_id_format" : "username",
"saml_signature_canonicalization_method" : "http://www.w3.org/2001/10/xml-exc-c14n#"
},
"authenticationFlowBindingOverrides" : { },
"fullScopeAllowed" : true,
"nodeReRegistrationTimeout" : -1,
"protocolMappers" : [ {
"id" : "9296daa3-4fc4-4b80-b007-5070f546ae13",
"name" : "X500 surname",
"protocol" : "saml",
"protocolMapper" : "saml-user-property-mapper",
"consentRequired" : false,
"config" : {
"attribute.nameformat" : "urn:oasis:names:tc:SAML:2.0:attrname-format:uri",
"user.attribute" : "lastName",
"friendly.name" : "surname",
"attribute.name" : "urn:oid:2.5.4.4"
}
}, {
"id" : "ccecf6e4-d20a-4211-b67c-40200a6b2c5d",
"name" : "username",
"protocol" : "saml",
"protocolMapper" : "saml-user-property-mapper",
"consentRequired" : false,
"config" : {
"attribute.nameformat" : "Basic",
"user.attribute" : "username",
"friendly.name" : "username",
"attribute.name" : "username"
}
}, {
"id" : "53858403-eba2-4f6d-81d0-cced700b5719",
"name" : "X500 givenName",
"protocol" : "saml",
"protocolMapper" : "saml-user-property-mapper",
"consentRequired" : false,
"config" : {
"attribute.nameformat" : "urn:oasis:names:tc:SAML:2.0:attrname-format:uri",
"user.attribute" : "firstName",
"friendly.name" : "givenName",
"attribute.name" : "urn:oid:2.5.4.42"
}
}, {
"id" : "20034db5-1d0e-4e66-b815-fb0440c6d1e2",
"name" : "X500 email",
"protocol" : "saml",
"protocolMapper" : "saml-user-property-mapper",
"consentRequired" : false,
"config" : {
"attribute.nameformat" : "urn:oasis:names:tc:SAML:2.0:attrname-format:uri",
"user.attribute" : "email",
"friendly.name" : "email",
"attribute.name" : "urn:oid:1.2.840.113549.1.9.1"
}
} ],
"defaultClientScopes" : [ "web-origins", "role_list", "roles", "profile", "email" ],
"optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ],
"access" : {
"view" : true,
"configure" : true,
"manage" : true
}
}, {
"id" : "bef873f0-2079-4876-8657-067de27d01b7",
"clientId" : "https://nextcloud.[[DOMAIN]]/apps/user_saml/saml/metadata",
"surrogateAuthRequired" : false,
"enabled" : true,
"alwaysDisplayInConsole" : false,
"clientAuthenticatorType" : "client-secret",
"redirectUris" : [ "https://nextcloud.[[DOMAIN]]/apps/user_saml/saml/acs" ],
"webOrigins" : [ "https://nextcloud.[[DOMAIN]]" ],
"notBefore" : 0,
"bearerOnly" : false,
"consentRequired" : false,
"standardFlowEnabled" : true,
"implicitFlowEnabled" : false,
"directAccessGrantsEnabled" : false,
"serviceAccountsEnabled" : false,
"publicClient" : false,
"frontchannelLogout" : true,
"protocol" : "saml",
"attributes" : {
"saml.assertion.signature" : "true",
"saml.force.post.binding" : "true",
"saml_assertion_consumer_url_post" : "https://nextcloud.[[DOMAIN]]/apps/user_saml/saml/acs",
"saml.server.signature" : "true",
"saml.server.signature.keyinfo.ext" : "false",
"saml.signing.certificate" : "[[SIGNING_CERTIFICATE]]",
"saml_single_logout_service_url_redirect" : "https://nextcloud.[[DOMAIN]]/apps/user_saml/saml/sls",
"saml.signature.algorithm" : "RSA_SHA256",
"saml_force_name_id_format" : "false",
"saml.client.signature" : "true",
"saml.authnstatement" : "true",
"saml_name_id_format" : "username",
"saml_signature_canonicalization_method" : "http://www.w3.org/2001/10/xml-exc-c14n#"
},
"authenticationFlowBindingOverrides" : { },
"fullScopeAllowed" : true,
"nodeReRegistrationTimeout" : -1,
"protocolMappers" : [ {
"id" : "e8e4acff-da2b-46aa-8bdb-ba42171671d6",
"name" : "username",
"protocol" : "saml",
"protocolMapper" : "saml-user-attribute-mapper",
"consentRequired" : false,
"config" : {
"attribute.nameformat" : "Basic",
"user.attribute" : "username",
"friendly.name" : "username",
"attribute.name" : "username"
}
}, {
"id" : "28206b59-757b-4e3c-81cb-0b6053b1fd3d",
"name" : "email",
"protocol" : "saml",
"protocolMapper" : "saml-user-property-mapper",
"consentRequired" : false,
"config" : {
"attribute.nameformat" : "Basic",
"user.attribute" : "email",
"friendly.name" : "email",
"attribute.name" : "email"
}
}, {
"id" : "e51e04b9-f71a-42de-819e-dd9285246ada",
"name" : "Roles",
"protocol" : "saml",
"protocolMapper" : "saml-role-list-mapper",
"consentRequired" : false,
"config" : {
"single" : "true",
"attribute.nameformat" : "Basic",
"friendly.name" : "Roles",
"attribute.name" : "Roles"
}
} ],
"defaultClientScopes" : [ "web-origins", "role_list", "roles", "profile", "email" ],
"optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ],
"access" : {
"view" : true,
"configure" : true,
"manage" : true
}
}, {
"id" : "78a85fd1-869d-4ba4-8391-5708f7d1abe6",
"clientId" : "master-realm",
"name" : "master Realm",
"surrogateAuthRequired" : false,
"enabled" : true,
"alwaysDisplayInConsole" : false,
"clientAuthenticatorType" : "client-secret",
"redirectUris" : [ ],
"webOrigins" : [ ],
"notBefore" : 0,
"bearerOnly" : true,
"consentRequired" : false,
"standardFlowEnabled" : true,
"implicitFlowEnabled" : false,
"directAccessGrantsEnabled" : false,
"serviceAccountsEnabled" : false,
"publicClient" : false,
"frontchannelLogout" : false,
"attributes" : { },
"authenticationFlowBindingOverrides" : { },
"fullScopeAllowed" : true,
"nodeReRegistrationTimeout" : 0,
"defaultClientScopes" : [ "web-origins", "role_list", "roles", "profile", "email" ],
"optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ],
"access" : {
"view" : true,
"configure" : true,
"manage" : true
}
}, {
"id" : "630601f8-25d1-4822-8741-c93affd2cd84",
"clientId" : "php-saml",
"surrogateAuthRequired" : false,
"enabled" : true,
"alwaysDisplayInConsole" : false,
"clientAuthenticatorType" : "client-secret",
"redirectUris" : [ "https://wp.[[DOMAIN]]/wp-login.php?saml_acs" ],
"webOrigins" : [ "https://wp.[[DOMAIN]]" ],
"notBefore" : 0,
"bearerOnly" : false,
"consentRequired" : false,
"standardFlowEnabled" : true,
"implicitFlowEnabled" : false,
"directAccessGrantsEnabled" : false,
"serviceAccountsEnabled" : false,
"publicClient" : false,
"frontchannelLogout" : true,
"protocol" : "saml",
"attributes" : {
"saml.force.post.binding" : "true",
"saml_assertion_consumer_url_post" : "https://wp.[[DOMAIN]]/wp-login.php?saml_acs",
"saml.server.signature" : "true",
"saml.server.signature.keyinfo.ext" : "false",
"saml.signing.certificate" : "[[SIGNING_CERTIFICATE]]",
"saml_single_logout_service_url_redirect" : "https://wp.[[DOMAIN]]/wp-login.php?saml_sls",
"saml.signature.algorithm" : "RSA_SHA256",
"saml_force_name_id_format" : "false",
"saml.client.signature" : "true",
"saml.authnstatement" : "true",
"saml_name_id_format" : "username",
"saml_signature_canonicalization_method" : "http://www.w3.org/2001/10/xml-exc-c14n#"
},
"authenticationFlowBindingOverrides" : { },
"fullScopeAllowed" : true,
"nodeReRegistrationTimeout" : -1,
"protocolMappers" : [ {
"id" : "72c6175e-bd07-4c27-abd6-4e4ae38d834b",
"name" : "username",
"protocol" : "saml",
"protocolMapper" : "saml-user-attribute-mapper",
"consentRequired" : false,
"config" : {
"attribute.nameformat" : "Basic",
"user.attribute" : "username",
"friendly.name" : "username",
"attribute.name" : "username"
}
}, {
"id" : "abd6562f-4732-4da9-987f-b1a6ad6605fa",
"name" : "roles",
"protocol" : "saml",
"protocolMapper" : "saml-role-list-mapper",
"consentRequired" : false,
"config" : {
"single" : "true",
"attribute.nameformat" : "Basic",
"friendly.name" : "Roles",
"attribute.name" : "Role"
}
}, {
"id" : "50aafb71-d91c-4bc7-bb60-e1ae0222aab3",
"name" : "email",
"protocol" : "saml",
"protocolMapper" : "saml-user-property-mapper",
"consentRequired" : false,
"config" : {
"attribute.nameformat" : "Basic",
"user.attribute" : "email",
"friendly.name" : "email",
"attribute.name" : "email"
}
} ],
"defaultClientScopes" : [ "web-origins", "role_list", "roles", "profile", "email" ],
"optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ],
"access" : {
"view" : true,
"configure" : true,
"manage" : true
}
} ]

View File

@ -0,0 +1,108 @@
{
"id" : "master",
"realm" : "master",
"displayName" : "Keycloak",
"displayNameHtml" : "<div class=\"kc-logo-text\"><span>Keycloak</span></div>",
"notBefore" : 0,
"revokeRefreshToken" : false,
"refreshTokenMaxReuse" : 0,
"accessTokenLifespan" : 60,
"accessTokenLifespanForImplicitFlow" : 900,
"ssoSessionIdleTimeout" : 1800,
"ssoSessionMaxLifespan" : 36000,
"ssoSessionIdleTimeoutRememberMe" : 0,
"ssoSessionMaxLifespanRememberMe" : 0,
"offlineSessionIdleTimeout" : 2592000,
"offlineSessionMaxLifespanEnabled" : false,
"offlineSessionMaxLifespan" : 5184000,
"clientSessionIdleTimeout" : 0,
"clientSessionMaxLifespan" : 0,
"clientOfflineSessionIdleTimeout" : 0,
"clientOfflineSessionMaxLifespan" : 0,
"accessCodeLifespan" : 60,
"accessCodeLifespanUserAction" : 300,
"accessCodeLifespanLogin" : 1800,
"actionTokenGeneratedByAdminLifespan" : 43200,
"actionTokenGeneratedByUserLifespan" : 300,
"enabled" : true,
"sslRequired" : "external",
"registrationAllowed" : false,
"registrationEmailAsUsername" : false,
"rememberMe" : false,
"verifyEmail" : false,
"loginWithEmailAllowed" : true,
"duplicateEmailsAllowed" : false,
"resetPasswordAllowed" : false,
"editUsernameAllowed" : false,
"bruteForceProtected" : false,
"permanentLockout" : false,
"maxFailureWaitSeconds" : 900,
"minimumQuickLoginWaitSeconds" : 60,
"waitIncrementSeconds" : 60,
"quickLoginCheckMilliSeconds" : 1000,
"maxDeltaTimeSeconds" : 43200,
"failureFactor" : 30,
"defaultRoles" : [ "offline_access", "uma_authorization" ],
"requiredCredentials" : [ "password" ],
"otpPolicyType" : "totp",
"otpPolicyAlgorithm" : "HmacSHA1",
"otpPolicyInitialCounter" : 0,
"otpPolicyDigits" : 6,
"otpPolicyLookAheadWindow" : 1,
"otpPolicyPeriod" : 30,
"otpSupportedApplications" : [ "FreeOTP", "Google Authenticator" ],
"webAuthnPolicyRpEntityName" : "keycloak",
"webAuthnPolicySignatureAlgorithms" : [ "ES256" ],
"webAuthnPolicyRpId" : "",
"webAuthnPolicyAttestationConveyancePreference" : "not specified",
"webAuthnPolicyAuthenticatorAttachment" : "not specified",
"webAuthnPolicyRequireResidentKey" : "not specified",
"webAuthnPolicyUserVerificationRequirement" : "not specified",
"webAuthnPolicyCreateTimeout" : 0,
"webAuthnPolicyAvoidSameAuthenticatorRegister" : false,
"webAuthnPolicyAcceptableAaguids" : [ ],
"webAuthnPolicyPasswordlessRpEntityName" : "keycloak",
"webAuthnPolicyPasswordlessSignatureAlgorithms" : [ "ES256" ],
"webAuthnPolicyPasswordlessRpId" : "",
"webAuthnPolicyPasswordlessAttestationConveyancePreference" : "not specified",
"webAuthnPolicyPasswordlessAuthenticatorAttachment" : "not specified",
"webAuthnPolicyPasswordlessRequireResidentKey" : "not specified",
"webAuthnPolicyPasswordlessUserVerificationRequirement" : "not specified",
"webAuthnPolicyPasswordlessCreateTimeout" : 0,
"webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister" : false,
"webAuthnPolicyPasswordlessAcceptableAaguids" : [ ],
"browserSecurityHeaders" : {
"contentSecurityPolicyReportOnly" : "",
"xContentTypeOptions" : "nosniff",
"xRobotsTag" : "none",
"xFrameOptions" : "SAMEORIGIN",
"contentSecurityPolicy" : "frame-src 'self'; frame-ancestors *; object-src 'none';",
"xXSSProtection" : "1; mode=block",
"strictTransportSecurity" : "max-age=31536000; includeSubDomains"
},
"smtpServer" : { },
"loginTheme" : "liiibrelite",
"accountTheme" : "account-avatar",
"eventsEnabled" : false,
"eventsListeners" : [ "jboss-logging" ],
"enabledEventTypes" : [ ],
"adminEventsEnabled" : false,
"adminEventsDetailsEnabled" : false,
"identityProviders" : [ ],
"identityProviderMappers" : [ ],
"internationalizationEnabled" : false,
"supportedLocales" : [ "" ],
"browserFlow" : "browser",
"registrationFlow" : "registration",
"directGrantFlow" : "direct grant",
"resetCredentialsFlow" : "reset credentials",
"clientAuthenticationFlow" : "clients",
"dockerAuthenticationFlow" : "docker auth",
"attributes" : {
"clientOfflineSessionMaxLifespan" : "0",
"clientSessionIdleTimeout" : "0",
"clientSessionMaxLifespan" : "0",
"clientOfflineSessionIdleTimeout" : "0"
},
"userManagedAccessAllowed" : false
}