Skip to content
Snippets Groups Projects
Commit 3344dc5b authored by Armin Felder's avatar Armin Felder
Browse files

extend documentation

parent c9169798
No related branches found
No related tags found
1 merge request!1initial
# Keycloak SAML2 metadata feed importer
config
# requirements
Python3.10+
(optional) an external database, to keep track of the syncs, if there is no external DB, sqlite has to be selected
## use
install the required Python packages
```bash
pip install -r requirements.txt
```
prepare the configuration as mentioned below
run the sync script with
```bash
./main.py
```
## configuration
### Environment variables
- SAML2_METADATA_URL (e.g. https://eduid.at/md/aconet-registered.xml)
- KEYCLOAK_URL (url to Keycloak instance)
- KEYCLOAK_REALM (Keycloak realm)
- KEYCLOAK_USER (Keycloak user)
- KEYCLOAK_PASSWORD (Keycloak users password)
- DB_TYPE (postresql, mysql or sqlite)
for external datbases
- DB_USER (database user)
- DB_PASSWORD (database password)
- DB_HOST (dbms host)
- DB_PORT (dbms port)
- DB_DATABASE (database )
\ No newline at end of file
- DB_DATABASE (database )
### mappings
edit ./attribute_mapping.json, key is the SAML2 attribute, value is the keycloak user attribute
### blacklist IDPs and or SPs
edit blacklist.json , for SPs list the clientId for IDPs the entityIds
\ No newline at end of file
import hashlib
#!/usr/bin/env python3
# import hashlib
import json
import os
import sqlite3
from datetime import datetime
from pprint import pprint
import database
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment