Skip to content
Yuxiang Huang edited this page Aug 14, 2026 · 16 revisions

Authentication

OpenID Connect + BetterAuth

After registering in Goldador, you will be able to access the OIDC ID and secret for your project from Keycloak at https://bao.scottylabs.org/ui/vault/secrets/labrador/list/<project-slug>/generated/.

Authorization

OAuth 2.0 + CASL

Reference: https://www.youtube.com/watch?v=gL3BJ8_5Jz8

M2M

For machine to machine auth (e.g. a web scraper script that populates the database through server API):

TOKEN_URL = "https://idp.scottylabs.org/realms/labrador/protocol/openid-connect/token"

data = {
    "grant_type": "client_credentials",
    "client_id": self.auth_client_id,
    "client_secret": self.auth_client_secret,
}

response = requests.post(TOKEN_URL, data=data, timeout=self.TIMEOUT)

token_data = response.json()
access_token = token_data.get("access_token")

...
headers={"Authorization": f"Bearer {access_token}"},
...

Clone this wiki locally