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

Pass JWT token to spring cloud config server #2406

Open
satya108agarwal opened this issue Apr 18, 2024 · 2 comments
Open

Pass JWT token to spring cloud config server #2406

satya108agarwal opened this issue Apr 18, 2024 · 2 comments

Comments

@satya108agarwal
Copy link

Describe the bug
I'm utilizing Spring Cloud Config Client version 4.1. Following the guidelines provided in the documentation found at https://docs.spring.io/spring-cloud-config/docs/current/reference/html/#_providing_a_custom_resttemplate_using_config_data. My objective is to transmit a JWT token to the config server for token authentication prior to delivering configurations to the client. However, the CustomBootstrapRegistryInitializer remains untriggered. Below is a sample implementation:

Sample
https://github.com/satya108agarwal/config-client/blob/master/src/main/java/config/CustomBootstrapRegistryInitializer.java

@satya108agarwal
Copy link
Author

satya108agarwal commented Apr 18, 2024

cc @dashaun

@dashaun
Copy link

dashaun commented Jun 8, 2024

@satya108agarwal I don't think this should be an issue here.

You are creating a custom config client. I looked at the example code you provided. Can you remind me why you are taking this approach?

I probably asked before, but I think it would add valuable context.

Here is what I'm thinking:

You want to make sure that "config clients" are authenticated when calling your "config server".

You want to validate with JWT token, you want your "config server" to validate it. So your "config server" should simply need an @resource and configuration pointing towards the "Spring Authorization Server" that you want to use to validate the JWT token.

What am I missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants