mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-29 22:48:15 +02:00
databroker: update identity manager to use route credentials (#5728)
## Summary Currently when we refresh sessions we always use the global IdP credentials. This PR updates the identity manager to use route settings when defined. To do this a new `idp_id` field is added to the session stored in the databroker. ## Related issues - [ENG-2595](https://linear.app/pomerium/issue/ENG-2595/refresh-using-custom-idp-uses-wrong-credentials) - https://github.com/pomerium/pomerium/issues/4759 ## Checklist - [x] reference any related issues - [x] updated unit tests - [x] add appropriate label (`enhancement`, `bug`, `breaking`, `dependencies`, `ci`) - [x] ready for review
This commit is contained in:
parent
e5e799a868
commit
622519e901
14 changed files with 185 additions and 123 deletions
|
@ -52,7 +52,7 @@ func (p *Proxy) getUserInfoData(r *http.Request) handlers.UserInfoData {
|
|||
if err == nil {
|
||||
data.Session, data.IsImpersonated, err = p.getSession(r.Context(), ss.ID)
|
||||
if err != nil {
|
||||
data.Session = &session.Session{Id: ss.ID}
|
||||
data.Session = session.New(ss.IdentityProviderID, ss.ID)
|
||||
}
|
||||
|
||||
data.User, err = p.getUser(r.Context(), data.Session.GetUserId())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue