A fork of crawl to explore the feasibility of adding Azure Active Directory B2C support for user authorization.
-
Deploy new AAD B2C tenant
-
Configure custom user attribute (str)"Crawlhandle"
-
Create new application and secret
-
Create Signup/signin user flow
-
For unique usernames, add API connector to Azure Function running this Azure Function, edited as needed
-
Install crawl build deps
sudo apt install build-essential libncursesw5-dev bison flex liblua5.1-0-dev \ libsqlite3-dev libz-dev pkg-config python3-yaml binutils-gold python-is-python3 \ libsdl2-image-dev libsdl2-mixer-dev libsdl2-dev \ libfreetype6-dev libpng-dev fonts-dejavu-core advancecomp pngcrush python3-pip
-
Compile crawl with webtiles and dgamelaunch
cd ./crawl-ref/source make -j4 WEBTILES=y DGAMELAUNCH=y -
Create a folder for crawldata.
-
Edit config.py to point to your crawldata folder.
-
Set environment variables for AAD_B2C client id and secret.
# Env vars export URLBASE="http://localhost:8080" export B2C_TENANT="<your AADB2C tenant name>" export SIGNUPSIGNUP_USER_FLOW="B2C_1_signupsignin (or your signup/signin flow name)" export EDITPROFILE_USER_FLOW="B2C_1_profileediting1 (or your profile editing flow name)" # Secret env vars export B2C_CLIENT_ID="<replace with client id of B2C application>" export B2C_CLIENT_SECRET="<replace with client secret of B2C application" export KV_CLIENT_ID="<replace with client id of SPN used for Keyvault authentication>" export KV_CLIENT_SECRET="<replace with client secret of SPN used for Keyvault authentication>" export KV_TENANT_ID="<replace with tenant id of SPN used for Keyvault authentication>" export KV_NAME="<replace with name of keyvault>"
-
Set up a Python virtualenv. From ./crawl-ref/source/
sudo apt install python3-pip pip install virtualenv python3 -m virtualenv -p python3 webserver/venv . ./webserver/venv/bin/activate pip install -r webserver/requirements/dev.py3.txt pip install azure-identity azure-keyvault-secrets msal torndsession redis
-
Logout url doesnt work
-
Sign in link still visible after signin