Commit d42fed8c authored by Lionel Morin's avatar Lionel Morin

Merge branch 'acl' into 'develop'

Acl

See merge request !1
parents f50cdf1a 8b1f3b8f
Pipeline #741 passed with stage
in 0 seconds
......@@ -149,33 +149,43 @@ rm $output/cert.tmp
#########################################
# Create roles
#########################################
createRole "ADMINISTRATOR" "description=Regular admin with full set of permissions"
createRole "OPERATOR" "description=Regular operator with basic set of permissions"
createRole "INSTALLER" "description=Regular technician with only enrollement permissions"
createRole "root" "description=SuperUser"
createRole "admin" "description=Regular admin with full set of permissions"
createRole "manager" "description=Regular manager with basic set of permissions"
createRole "viewer" "description=Regular technician with only enrollement permissions"
#########################################
# Create groups
#########################################
GROUP_ID=""
createGroup "Administrator"
createGroup "root"
gidRoot=$GROUP_ID
createGroup "admin"
gidAdmin=$GROUP_ID
createGroup "Operator"
createGroup "manager"
gidOperator=$GROUP_ID
createGroup "Installator"
createGroup "viewer"
gidInstaller=$GROUP_ID
#########################################
# Role affectation
#########################################
affectGroupToRole "$gidAdmin" "ADMINISTRATOR"
affectGroupToRole "$gidOperator" "OPERATOR"
affectGroupToRole "$gidInstaller" "INSTALLER"
affectGroupToRole "$gidRoot" "root"
affectGroupToRole "$gidAdmin" "admin"
affectGroupToRole "$gidOperator" "manager"
affectGroupToRole "$gidInstaller" "viewer"
#########################################
# Create users
#########################################
USER_UID=""
createUser "$KC_REALM_USERNAME" "$KC_REALM_PASSWORD" "$gidAdmin"
createUser "$KC_REALM_USERNAME" "$KC_REALM_PASSWORD" "$gidRoot"
#########################################
# Set Default Role
#########################################
defaultRole="viewer"
$kcadm update realms/$realm -s defaultRoles+=$defaultRole
#########################################
# Create client(s)
......@@ -214,4 +224,5 @@ $kcadm get clients/$client_id/installation/providers/keycloak-oidc-keycloak-json
[ $? = 0 ] || die "Unable to get configuration file"
cat $output/keycloak.json
cp $output/keycloak.json /tmp/zephir
echo "Keycloak successfully configured."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment