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

Allow HTTP (localhost only) for IDPortenUri #210

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

etse
Copy link
Contributor

@etse etse commented Apr 3, 2024

As discussed on the OPaaS-slack.

For local development it can be nice to allow http as a URL to ID-porten (for things like post-login-uri etc). But since the general rule should be to only use HTTPS, this pattern will only allow HTTP if it is on localhost. This means we would not need to use self-signed certificate to do local development with authentication enabled.

DigDir does not allow http in production, but for test-clients it is allowed.

This pattern will match URIs that either start with https:// or http://localhost: (i added the requirement to add : which is usually followed by a port to make sure it did not match domains that just start with the word localhost like "localhost.com")

http://localhost:8080/
https://kartverket.no
https://nav.no

It will not match URIs like:

http://localhost.com
http://kartverket.no
http://nav.no

@etse etse requested a review from a team as a code owner April 3, 2024 13:08
Copy link
Contributor

@tronghn tronghn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for the contribution!

@tronghn tronghn merged commit 76d5a38 into nais:main Apr 3, 2024
3 checks passed
@etse etse deleted the http-idportenuri branch April 3, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants