Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Support multiple client-registration-id configurations

Open
#1,343 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, spring

Research direction

Locate the existing handling for spring.cloud.openfeign.oauth2.client-registration-id and the OAuth2AccessTokenInterceptor entry point. Add support for the proposed client-registration-ids map keyed by Feign client name, while retaining the existing property as the default, and verify both configuration paths.

Written by the indexing model from the issue text.

Description

waiting-for-triage

Multiple registration ids
In some environments it is required to support targeting multiple Oauth2 servers. The current solution for non-load-balanced feign clients only provide a single client-registration-id with the property spring.cloud.openfeign.oauth2.client-registration-id, so this is not possible.

Proposed solution
Add a new configuration: spring.cloud.openfeign.oauth2.client-registration-ids which should be a Map<String, String> mapping feign clients by name to a registration id. The default should still be spring.cloud.openfeign.oauth2.client-registration-id so there are no backward compatibility issues.

Other alternatives considered

  • Using load-balanced clients
    • Downsides
      • A new spring.security.oauth2.client.registration and spring.security.oauth2.client.provider must be provided per each client if the clients use discrete names
      • Using the same name makes it difficult to do ad-hoc switching of hostname for a single client
      • The logs do not show the actual URL called, which makes debugging much more difficult
  • Make a local custom OAuth2AccessTokenInterceptor
Dominant language
Java
Stars
1.3k
Forks
836
Avg merge
19h 49m
Merged PRs (30d)
24

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from spring-cloud/spring-cloud-openfeign

All issues in spring-cloud/spring-cloud-openfeign

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.