Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6bc13de
add jhub apps service account with admin permissions
Adam-D-Lewis Jan 20, 2025
a2e1620
Merge branch 'main' into jhub_apps_user
Adam-D-Lewis Jan 21, 2025
234baa2
reduce permissions
Adam-D-Lewis Jan 21, 2025
d609271
cleanup
Adam-D-Lewis Jan 21, 2025
01d1d5d
consolidate calls
Adam-D-Lewis Jan 21, 2025
1bfe644
revert to non service account user for jhub apps startup apps
Adam-D-Lewis Jan 21, 2025
a4943bb
cleanup
Adam-D-Lewis Jan 21, 2025
5f9834a
hacky, but works
Adam-D-Lewis Jan 27, 2025
7e6204a
add role to service account + cleanup
Adam-D-Lewis Jan 27, 2025
2a3e49b
try to set service account auth state, but I don't think it's working
Adam-D-Lewis Jan 28, 2025
110b0ee
fix bug and set auth state for service account
Adam-D-Lewis Jan 28, 2025
a0f4efe
cleanup
Adam-D-Lewis Jan 28, 2025
f180f07
cleanup
Adam-D-Lewis Jan 28, 2025
6406e82
cleanup
Adam-D-Lewis Jan 28, 2025
325a601
make service account name a variable
Adam-D-Lewis Jan 28, 2025
64d3e0b
rename id to uuid for clarity
Adam-D-Lewis Jan 28, 2025
cb775e0
remove unneeded code
Adam-D-Lewis Jan 28, 2025
59078cc
fix
Adam-D-Lewis Jan 28, 2025
f799f3e
cleanup
Adam-D-Lewis Jan 28, 2025
21d0880
clarify docstring
Adam-D-Lewis Jan 28, 2025
0be3851
clarify docstring
Adam-D-Lewis Jan 28, 2025
fedf7ae
Merge branch 'main' into jhub_apps_user
Adam-D-Lewis Jan 28, 2025
2fb4fa8
fix buffer full deadlock
Adam-D-Lewis Jan 29, 2025
8cb0e63
ensure binary raw string
Adam-D-Lewis Jan 29, 2025
556661f
strip all ansi formatting sequences
Adam-D-Lewis Jan 29, 2025
7e5c2b0
Revert "strip all ansi formatting sequences"
Adam-D-Lewis Jan 29, 2025
37bd636
Revert "ensure binary raw string"
Adam-D-Lewis Jan 29, 2025
b6e75de
Revert "fix buffer full deadlock"
Adam-D-Lewis Jan 29, 2025
1fce666
fix fstring
Adam-D-Lewis Feb 3, 2025
865c8d6
add comment with jupyter/oauth code we are mimicking
Adam-D-Lewis Feb 3, 2025
fad0155
add keycloak service account name format comment
Adam-D-Lewis Feb 3, 2025
8569ee8
merge with main
Adam-D-Lewis Feb 10, 2025
80456c5
test that jupyterhub service account gets needed roles
Adam-D-Lewis Feb 10, 2025
627c4aa
add a startup app to ci deployment
Adam-D-Lewis Feb 10, 2025
6de7c1d
assert startup server is created
Adam-D-Lewis Feb 10, 2025
48eae29
fix test_startup_apps_created test
Adam-D-Lewis Feb 10, 2025
fbaec09
remove breakpoint
Adam-D-Lewis Feb 10, 2025
708f753
refactor keycloak command cli
Adam-D-Lewis Feb 10, 2025
e7da0aa
make test-user an admin
Adam-D-Lewis Feb 10, 2025
de43a81
fix test ids
Adam-D-Lewis Feb 10, 2025
9810fdb
update tests since test-user is now an admin
Adam-D-Lewis Feb 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,25 @@ resource "kubernetes_secret" "jhub_apps_secrets" {
type = "Opaque"
}


resource "keycloak_user" "jhub_apps_service_account" {
count = var.jhub-apps-enabled ? 1 : 0
realm_id = var.realm_id
username = "service-account-jhub-apps"
enabled = false
}


resource "keycloak_user_roles" "jhub_apps_sa_allow_app_sharing_role" {
count = var.jhub-apps-enabled ? 1 : 0
realm_id = var.realm_id
user_id = keycloak_user.jhub_apps_service_account.id
role_ids = [
module.jupyterhub-openid-client.client_role_ids["allow-app-sharing-role"]
]
exhaustive = true
}

locals {
jupyterhub_env_vars = [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
required_providers {
keycloak = {
source = "mrparkers/keycloak"
version = "3.7.0"
}
}
required_version = ">= 1.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ output "config" {
callback_urls = var.callback-url-paths
}
}

output "client_role_ids" {
description = "Map of role names to their IDs"
value = {
for role_key, role in keycloak_role.default_client_roles : role_key => role.id
}
}
Loading