Comments (7)
Sadly I have no experience with Azure AD.
Are you getting the error in headscale-webui or in Azure?
Can you post some logs from headscale-webui?(in DEBUG mode it dumps secrets so be sure to either wipe those or use new ones after)
from headscale-webui.
Also post your docker-compose.yml
from headscale-webui.
I get the error from the /oidc_callback in headscale-webui - after the redirect from azure ad.
docker-compose.yaml:
version: '3'
services:
headscale:
container_name: headscale
image: headscale/headscale
restart: always
environment:
- LETSENCRYPT_HOST=<wiped host.domain.tdl>
- VIRTUAL_HOST=<wiped host.domain.tdl>
- VIRTUAL_PORT=8080
- VIRTUAL_PATH=/
volumes:
- ./config:/etc/headscale
- ./data:/var/lib/headscale
entrypoint: headscale serve
headscale-webui:
container_name: headscale-webui
image: ghcr.io/ifargle/headscale-webui
environment:
- LETSENCRYPT_HOST=<wiped host.domain.tdl>
- VIRTUAL_HOST=<wiped host.domain.tdl>
- VIRTUAL_PATH=/admin
- VIRTUAL_PORT=5000
- TZ=Europe/Zurich
- HS_SERVER=https://<wiped host.domain.tdl>
- DOMAIN_NAME=https://<wiped host.domain.tdl>
- SCRIPT_NAME=/admin
- KEY=<wiped key>
- AUTH_TYPE=oidc
- OIDC_AUTH_URL=https://login.microsoftonline.com/<wiped azure tenant id>/v2.0/.well-known/openid-configuration
- OIDC_CLIENT_ID=<wiped client id>
- OIDC_CLIENT_SECRET=<wiped secret>
- LOG_LEVEL=Debug
volumes:
- ./webui:/data
- ./config:/etc/headscale:ro
logs:
[2023-04-05 10:11:35 +0200] [1] [INFO] Starting gunicorn 20.1.0
[2023-04-05 10:11:35 +0200] [1] [INFO] Listening at: http://0.0.0.0:5000 (1)
[2023-04-05 10:11:35 +0200] [1] [INFO] Using worker: sync
[2023-04-05 10:11:35 +0200] [7] [INFO] Booting worker with pid: 7
[2023-04-05 10:11:36,131] INFO in server: Headscale-WebUI Version: v0.6.1 / main
[2023-04-05 10:11:36,132] INFO in server: LOG LEVEL SET TO DEBUG
[2023-04-05 10:11:36,132] INFO in server: DEBUG STATE: True
[2023-04-05 10:11:36,132] INFO in server: Loading OIDC libraries and configuring app...
[2023-04-05 10:11:36,304] DEBUG in server: JSON Dumps for OIDC_INFO: {"token_endpoint": "https://login.microsoftonline.com/<wiped azure tenant id>/oauth2/v2.0/token", "token_endpoint_auth_methods_supported": ["client_secret_post", "private_key_jwt", "client_secret_basic"], "jwks_uri": "https://login.microsoftonline.com/<wiped azure tenant id>/discovery/v2.0/keys", "response_modes_supported": ["query", "fragment", "form_post"], "subject_types_supported": ["pairwise"], "id_token_signing_alg_values_supported": ["RS256"], "response_types_supported": ["code", "id_token", "code id_token", "id_token token"], "scopes_supported": ["openid", "profile", "email", "offline_access"], "issuer": "https://login.microsoftonline.com/<wiped azure tenant id>/v2.0", "request_uri_parameter_supported": false, "userinfo_endpoint": "https://graph.microsoft.com/oidc/userinfo", "authorization_endpoint": "https://login.microsoftonline.com/<wiped azure tenant id>/oauth2/v2.0/authorize", "device_authorization_endpoint": "https://login.microsoftonline.com/<wiped azure tenant id>/oauth2/v2.0/devicecode", "http_logout_supported": true, "frontchannel_logout_supported": true, "end_session_endpoint": "https://login.microsoftonline.com/<wiped azure tenant id>/oauth2/v2.0/logout", "claims_supported": ["sub", "iss", "cloud_instance_name", "cloud_instance_host_name", "cloud_graph_host_name", "msgraph_host", "aud", "exp", "iat", "auth_time", "acr", "nonce", "preferred_username", "name", "tid", "ver", "at_hash", "c_hash", "email"], "kerberos_endpoint": "https://login.microsoftonline.com/<wiped azure tenant id>/kerberos", "tenant_region_scope": "EU", "cloud_instance_name": "microsoftonline.com", "cloud_graph_host_name": "graph.windows.net", "msgraph_host": "graph.microsoft.com", "rbac_url": "https://pas.windows.net"}
[2023-04-05 10:11:36,305] DEBUG in server: Client Secrets:
[2023-04-05 10:11:36,306] DEBUG in server: /app/instances/secrets.json:
[2023-04-05 10:11:36,306] DEBUG in server: {"web": {"issuer": "https://login.microsoftonline.com/<wiped azure tenant id>/v2.0", "auth_uri": "https://login.microsoftonline.com/<wiped azure tenant id>/oauth2/v2.0/authorize", "client_id": "<wiped client id>", "client_secret": "<wiped secret>", "redirect_uris": ["https://<wiped host.domain.tdl>/admin/oidc_callback"], "userinfo_uri": "https://graph.microsoft.com/oidc/userinfo", "token_uri": "https://login.microsoftonline.com/<wiped azure tenant id>/oauth2/v2.0/token"}}
Token issued in the past
from headscale-webui.
Seems like it's caused by your time being out of sync.
Is your server time in sync "enough" with Microsoft's?
from headscale-webui.
I guess so, the docker container runs on an azure vm and its time seams in sync. how ever the container time is timezoned...
the time of the oidc endpoint can't be verified by me.
from headscale-webui.
There is a clock-skew config we can pass to the oidc library. I'll try that once the changes being worked on are settled.
from headscale-webui.
There is a clock-skew config we can pass to the oidc library. I'll try that once the changes being worked on are settled.
I did this and made you #112
from headscale-webui.
Related Issues (20)
- OIDC server does not support profile
- Stuck on "Loading basic auth libraries and configuring app" HOT 3
- Rename Machine to Node
- Documentation question HOT 1
- docker running error:SSL: CERTIFICATE_VERIFY_FAILED
- Could you setup a way to sponsor this project?
- WebUI Internal Server Error: HOT 3
- Gunicorn Worker Timeout HOT 2
- Problems with HAproxy reverse
- Bare Metal install fails on ubuntu 22.04 HOT 1
- SSL/TLS
- API calls to /machine are deprecated; use /node HOT 2
- Support configuration of SSH ACLs
- New user is not cleared after adding
- Cannot open /machines, /routes or /overview HOT 2
- State of project - Abandoned? HOT 2
- UID 1001 can't use for webui? HOT 1
- Internal Server Error on "machines" HOT 4
- How to run it in the background? HOT 2
- Define and access gui using localhost or 0.0.0.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from headscale-webui.