Skip to content

Commit

Permalink
✨ enable oauth2
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhiljha committed Apr 23, 2024
1 parent a6df597 commit e11100b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .transpire.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,15 @@ def objects():
"kill-timeout": "1s",
"max-concurrency": 64,
},
"oauth2": {
"enabled": True,
"autocreate": True,
"introspection-url": "https://idm.ocf.berkeley.edu/realms/ocf/protocol/openid-connect/token/introspect",
"introspection-timeout": "10s",
"client-id": "ergo",
# Set via ERGO__ACCOUNTS__OAUTH2__CLIENT_SECRET
# "client-secret": ""
}
},
"channels": {
"default-modes": "+ntC",
Expand Down Expand Up @@ -318,6 +327,16 @@ def objects():
},
}

# Secrets
yield {
"apiVersion": "v1",
"kind": "Secret",
"metadata": {"name": "ircd-secrets"},
"stringData": {
"ERGO__ACCOUNTS__OAUTH2__CLIENT_SECRET": "",
},
}

ircd_labels = {"k8s.ocf.io/app": name, "k8s.ocf.io/component": "ircd"}
yield {
"apiVersion": "apps/v1",
Expand All @@ -340,6 +359,7 @@ def objects():
{"name": "ircd-config", "mountPath": "/ircd"},
{"name": "ircd-tls", "mountPath": "/etc/ssl"},
],
"envFrom": [{"secretRef": {"name": "ircd-secrets"}}],
},
{
"name": "gamja",
Expand Down
4 changes: 4 additions & 0 deletions gamja/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
"server": {
"url": "wss://irc-dev.ocf.berkeley.edu:8097",
"autojoin": "#rebuild"
},
"oauth2": {
"url": "https://idm.ocf.berkeley.edu/realms/ocf",
"client_id": "ergo"
}
}

0 comments on commit e11100b

Please sign in to comment.