Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable PEN access, drop KrakenD #2

Merged
merged 6 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
env:
CLUSTER: dev-gcp
IMAGE: ${{ needs.build.outputs.image }}
RESOURCE: .nais/deploy-dev.yml,.nais/apiendpoints.yaml
RESOURCE: .nais/deploy-dev.yml
trivy-imagescan:
name: Scan Docker image
needs: [ build ]
Expand Down
26 changes: 0 additions & 26 deletions .nais/apiendpoints.yaml

This file was deleted.

9 changes: 8 additions & 1 deletion .nais/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
min: 2
max: 2
ingresses:
- https://pensjonssimulator.intern.dev.nav.no
- https://pensjonssimulator.ekstern.dev.nav.no
liveness:
path: /internal/health/liveness
initialDelay: 30
Expand Down Expand Up @@ -49,6 +49,13 @@ spec:
namespace: aura
- application: tokenx-token-generator
namespace: aura
outbound:
rules:
- application: pensjon-pen-q2
namespace: pensjon-q2
cluster: dev-fss
external:
- host: pensjon-pen-q2.dev-fss-pub.nais.io
env:
- name: PEN_SERVICE_ID
value: dev-fss:pensjon-q2:pensjon-pen-q2
Expand Down
2 changes: 1 addition & 1 deletion .nais/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
max: 4
cpuThresholdPercentage: 70
ingresses:
- https://pensjonssimulator.intern.nav.no
- https://www.nav.no/pensjon/simulator
liveness:
path: /internal/health/liveness
initialDelay: 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ class EnrichedAuthentication(
return egressTokenSuppliersByService.value[service]?.get() ?: RawJwt("")
}

override fun getName(): String = initialAuth?.name ?: "no name"
override fun getName(): String? = initialAuth?.name

override fun getAuthorities(): MutableCollection<out GrantedAuthority> = initialAuth!!.authorities
override fun getAuthorities(): MutableCollection<out GrantedAuthority>? = initialAuth?.authorities

override fun getCredentials(): Any = initialAuth!!.credentials
override fun getCredentials(): Any? = initialAuth?.credentials

override fun getDetails(): Any = initialAuth!!.details
override fun getDetails(): Any? = initialAuth?.details

override fun getPrincipal(): Any = initialAuth?.principal ?: "no principal"
override fun getPrincipal(): Any? = initialAuth?.principal

override fun isAuthenticated(): Boolean = initialAuth!!.isAuthenticated
override fun isAuthenticated(): Boolean = initialAuth?.isAuthenticated ?: false

override fun setAuthenticated(isAuthenticated: Boolean) {
initialAuth!!.isAuthenticated = isAuthenticated
initialAuth?.let { it.isAuthenticated = isAuthenticated }
}
}

Expand Down