Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Instance Profiles #2

Open
tecnobrat opened this issue Sep 15, 2017 · 7 comments
Open

Instance Profiles #2

tecnobrat opened this issue Sep 15, 2017 · 7 comments

Comments

@tecnobrat
Copy link

Is there a possibility that this could be expanded to support instance profiles instead of hard coded credentials?

@MrSaints
Copy link
Owner

Definitely possible @tecnobrat. But it requires some re-working since it relies on user-specified configuration ATM (https://github.com/MrSaints/kong-plugin-aws/blob/master/kong/plugins/aws/handler.lua#L29).

I am not sure if that is something we should do though, since it seems like all Kong plugins are configured that way, rather than set using files or environment variables (that being said, that is how most AWS SDKs are set up).

@tecnobrat
Copy link
Author

The difference in my opinion is that there is an alternative to user-specified configuration in this case, which I don't think is the case for any other kong plugins.

@michaelcurran
Copy link
Contributor

+1 for instance profiles. I think it'd be a very useful feature to have the ability to use the dynamic short-lived credentials over having to manage and provide a single hard-coded IAM key.

@MrSaints
Copy link
Owner

I don't disagree @tecnobrat, but I derived this plugin from https://getkong.org/plugins/aws-lambda/. And they didn't seem to opt for the environment variable route. That being said, we could probably get some inspiration from: https://github.com/adobe-apiplatform/api-gateway-aws/blob/master/src/lua/api-gateway/aws/AWSIAMCredentials.lua

@tecnobrat
Copy link
Author

Totally! That code looks like how the ruby and node AWS SDK's implement it.

@tecnobrat
Copy link
Author

@MrSaints Kong/kong#2777

looks like there is a pending PR against the lambda plugin which does this :)

@MrSaints
Copy link
Owner

I'll have a look, should be easy to cherry-pick it here @tecnobrat 👍

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

No branches or pull requests

3 participants