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

Policies should be able to extend credentials #495

Closed
mikz opened this issue Nov 21, 2017 · 0 comments · Fixed by #556
Closed

Policies should be able to extend credentials #495

mikz opened this issue Nov 21, 2017 · 0 comments · Fixed by #556
Assignees

Comments

@mikz
Copy link
Contributor

mikz commented Nov 21, 2017

Some policies will need to access/modify credentials the client authenticated with.

Unfortunately they are extracted and sent to backend in one method:
https://github.com/3scale/apicast/blob/632d0f38a436b95c864be0c901713ff0cd3dbc5c/gateway/src/apicast/proxy.lua#L238-L293

That makes it very hard to hook into this process.

For example adding support for End User Plans needs to add user_id to the credentials: 3b2a0da

One way to solve this would be to split credentials extraction into own module.
Another way would be to have some "credentials extractor" object that is exported into the shared context by the apicast module, but could be exported by another module and overridden.

Another one would be to do this in rewrite phase and leave access phase just for the actual call.
Then any policy could manipulate the credentials between the rewrite and access phase.

/cc @kevprice83

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

Successfully merging a pull request may close this issue.

1 participant