spring-cloud / spring-cloud/spring-cloud-commons
Unable to get logging.config from auth-protected config server URL
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 751
- Forks
- 744
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
I've got a Spring Boot (1.3.5 release) app up and running in CloudFoundry, and talking to a CloudFoundry Config Server (Brixton release) that's pointed to my config repo. I've added a log4j.xml file to the repo, so I can change my logging based on which profiles are active. I've also added the following to the bootstrap.yml for my app:
logging:
config: ${vcap.services.configserver.credentials.uri}/default/test/dev/log4j.xml
The request for the log4j file is showing up in the startup logs, but is getting a 401 - Unauthroized response, and failing to start the app entirely.
I can make the same request in PostMan, with OAuth credentials, and get the valid file data back. The request for the log4j file should use the same credentials as the connection to the config server, but it looks like the source code isn't looking for any credentials.
Is there a way I could either specify username/password as sub-properties for the logging.config (similar to the spring.cloud.config), or have it automatically reuse the credentials credentials provided for spring.cloud.config?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with PropertySourceBootstrapConfiguration.java at the linked line and trace how logging.config is fetched versus how spring.cloud.config credentials are provided. Determine whether credentials can be configured or reused, then verify that startup retrieves log4j.xml from an authenticated config-server URL without a 401 failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- authentication, backend, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100