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

Maintain legacy OAuth headers #52

Closed
nynymike opened this issue Mar 26, 2018 · 4 comments
Closed

Maintain legacy OAuth headers #52

nynymike opened this issue Mar 26, 2018 · 4 comments
Assignees
Milestone

Comments

@nynymike
Copy link
Contributor

Kong defines a few headers:

https://getkong.org/plugins/oauth2-authentication/#upstream-headers

We will need to add

* X-Consumer-ID, the ID of the Consumer on Kong
* ADD THIS TO PLUGIN & KONGA: X-Consumer-Custom-ID, the custom_id of the Consumer (if set)
* X-Consumer-Username, the username of the Consumer (if set)
* ADD THIS FOR OAUTH2 CLIENTS ONLY: X-Authenticated-Scope, the comma-separated list of scopes that the end user has authenticated, if available (only if the consumer is not the 'anonymous' consumer)
* OMIT: X-Authenticated-Userid, the logged-in user ID who has granted permission to the client (only if the consumer is not the 'anonymous' consumer)
* X-Anonymous-Consumer, will be set to true when authentication failed, and the 'anonymous' consumer was set instead.
@nynymike nynymike added this to the 3.1.3 milestone Mar 26, 2018
ldeveloperl1985 added a commit that referenced this issue Mar 27, 2018
@nynymike nynymike reopened this Apr 2, 2018
@nynymike
Copy link
Contributor Author

nynymike commented Apr 2, 2018

  1. I do not see any way for the admin to populate the X-Consumer-Custom-ID header in Konga.
  2. X-Consumer-Custom-ID I think this also needs a Yes|No form control

@ldeveloperl1985
Copy link
Contributor

You can set custom_id of a consumer using Consumer section
4_customer_add

Currently, there is no way for an admin to hide/show from the header, it by default adds in the header after successful authentication.

https://github.com/GluuFederation/gluu-gateway/blob/master/gluu-oauth2-client-auth/kong/plugins/gluu-oauth2-client-auth/access.lua#L138

@nynymike
Copy link
Contributor Author

nynymike commented Apr 3, 2018

This is an id distinct from the consumer id... it is present in the default kong oauth plugin

@ldeveloperl1985
Copy link
Contributor

Added a field for show and hide consumer custom id from header.

claim_header

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

No branches or pull requests

2 participants