Skip to content

Commit

Permalink
maint: update upload URL
Browse files Browse the repository at this point in the history
feat: oauth redirect url
  • Loading branch information
xgui3783 committed Dec 11, 2024
1 parent b8b15a1 commit 13ca772
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .helm/instances/voluba-prod/ebrains/create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /bin/bash

hosts='[{"host": "voluba.apps.ebrains.eu", "paths": [{ "path": "/", "pathType": "Prefix" }]}]'
tls='[{"secretName": "voluba-prod-ebrains-cert-secret", "hosts": ["voluba.apps.ebrains.eu"]}]'

helm install \
voluba-prod-ebrains \
.helm/voluba-prod/ \
--set env.HOSTNAME=https://voluba.apps.ebrains.eu \
--set-json ingress.hosts="$hosts" \
--set-json ingress.tls="$tls"
5 changes: 4 additions & 1 deletion backend/voluba_backend/voluba_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ async def login_via_ebrains(request: Request, state: str = None):
kwargs = {}
if state:
kwargs["state"] = state
return await oauth.ebrains.authorize_redirect(request, redirect_uri=voluba_config.EBRAINS_IAM_REDIRECT_URL, **kwargs)

base_url = str(request.base_url).replace("http://", "https://", 1)
redirect_uri = base_url.rstrip("/") + "/hbp-oidc-v2/cb"
return await oauth.ebrains.authorize_redirect(request, redirect_uri=voluba_config.EBRAINS_IAM_REDIRECT_URL or redirect_uri, **kwargs)

@router.get("/hbp-oidc-v2/cb")
async def ebrains_callback(request: Request):
Expand Down
2 changes: 1 addition & 1 deletion backend/voluba_backend/voluba_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
EBRAINS_IAM_CLIENT_ID = os.getenv("HBP_V2_CLIENTID")
EBRAINS_IAM_CLIENT_SECRET = os.getenv("HBP_V2_CLIENTSECRET")
EBRAINS_IAM_DISCOVERY_URL = 'https://iam.ebrains.eu/auth/realms/hbp'
EBRAINS_IAM_REDIRECT_URL = f"{HOSTNAME}/hbp-oidc-v2/cb"
EBRAINS_IAM_REDIRECT_URL = os.getenv("EBRAINS_IAM_REDIRECT_URL")
EBRAINS_IAM_SCOPE = os.getenv("HBP_V2_SCOPE", 'openid email profile collab.drive')

EBRAINS_SA_CLIENT_ID = os.getenv("EBRAINS_SA_CLIENT_ID")
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ import { Subject, debounceTime, map, merge, shareReplay } from 'rxjs';
{
provide: VOLUBA_APP_CONFIG,
useValue: {
uploadUrl: "https://zam10143.zam.kfa-juelich.de/chumni",
uploadUrl: "https://zam12230.jsc.fz-juelich.de/bespoke-volis/",
linearBackend: "https://voluba-backend.apps.tc.humanbrainproject.eu",
sxplrhost: "https://atlases.ebrains.eu/viewer"
} as VolubaAppConfig
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ export type ZarrAttrs = {
version: string
axes: {
name: "x" | "y" | "z" | string
type: "space" | string
type: "space" | "channel" | string
unit: "micrometer" | string
}[]
datasets: {
Expand Down

0 comments on commit 13ca772

Please sign in to comment.