Skip to content

Commit

Permalink
fix(auth): OIDC issuer typos
Browse files Browse the repository at this point in the history
  • Loading branch information
awlayton committed Feb 13, 2024
1 parent 859101d commit ea90599
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ services:
# Should just be an external script someone can run on their instance?
arangodb__ensureDefaults: 'true'
DOMAIN: ${DOMAIN:-localhost}
AUTH_ISSUER: ${AUTH_ISSUER}
OIDC_ISSUER: ~
NODE_TLS_REJECT_UNAUTHORIZED: ~
PINO_TRANSPORT: ~
PROFILE_AQL: ~
Expand Down
5 changes: 3 additions & 2 deletions oada/services/http-handler/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,9 @@ async function discoverConfiguration(issuer: string | URL) {
return metadata;
}
} catch (error: unknown) {
fastify.log.error({ issuer }, 'Failed OIDC discovery for issuer');
throw error;
throw new Error(`Failed OIDC discovery for issuer '${issuer}'`, {
cause: error,
});
}
}

Expand Down
7 changes: 4 additions & 3 deletions oada/services/well-known/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ export async function discoverConfiguration(issuer: string | URL) {
const { metadata } = await Issuer.discover(`https://${issuer}`);
return metadata;
}
} catch {
fastify.log.error({ issuer }, 'Failed OIDC discovery for issuer');
return {};
} catch (error: unknown) {
throw new Error(`Failed OIDC discovery for issuer '${issuer}'`, {
cause: error,
});
}
}

Expand Down
2 changes: 1 addition & 1 deletion release/.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ DEBUG=*
PINO_LEVEL=info
PINO_TRANSPORT=
NODE_TLS_REJECT_UNAUTHORIZED=
AUTH_ISSUER=${DOMAIN}
OIDC_ISSUER=${DOMAIN}
1 change: 1 addition & 0 deletions release/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ x-release:
DEBUG_SHOW_HIDDEN: ~
PINO_TRANSPORT: ~
DOMAIN: ~
OIDC_ISSUER: ${OIDC_ISSUER-http://auth/oadaauth}
NODE_TLS_REJECT_UNAUTHORIZED: ~
# Allow changing arangodb URL (e.g., to use external arango)
ARANGODB_URL: ${ARANGODB_URL-http://arangodb:8529}
Expand Down

0 comments on commit ea90599

Please sign in to comment.