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

Documentation improvement: Connect from containerized Api #115

Open
TheAutomaTom opened this issue Jun 3, 2024 · 0 comments
Open

Documentation improvement: Connect from containerized Api #115

TheAutomaTom opened this issue Jun 3, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed

Comments

@TheAutomaTom
Copy link

@NikiforovAll can we please get some advice on how to get a Web Api debugging in the default Docker launch profile to connect to a Keycloak running also running on a local (separate) container?

I hope this simple repo with keycloak export and postman calls may be a positive contribution to the effort:
TheAutomaTom/Lab.Keycloak

Original discussion topic for reference:

Is there any documentation on how to run a web api in docker, connecting to Keycloak in a separate docker container?

When I try, the exception begins with:
Warning: Unable to verify the first certificate.

And, at the bottom of the response I see:
WWW-Authenticate: Bearer error="invalid_token", error_description="The issuer 'http://localhost:8080/realms/my-realm' is invalid"

This is my config:

"Keycloak": {
"realm": "my-realm",
"resource": "my-client",
//"auth-server-url": "http://localhost:8080/", // for http or https launch profiles
"auth-server-url": "http://host.docker.internal:8080/",
"ssl-required": "none",
"verify-token-audience": false,
"credentials": {
"secret": "my-secret"
}
},

This solution works fine in http and https launch profiles.

I realize this isn't specifically related to your nuget, but I have not found any docs about local development covering this. Thanks!

@NikiforovAll NikiforovAll added help wanted Extra attention is needed documentation Improvements or additions to documentation labels Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants