Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Add support for IAM namespaces on IBM Cloud #169

Open
jthomas opened this issue May 22, 2019 · 10 comments
Open

Add support for IAM namespaces on IBM Cloud #169

jthomas opened this issue May 22, 2019 · 10 comments
Milestone

Comments

@jthomas
Copy link
Contributor

jthomas commented May 22, 2019

Need to use custom auth plugin for new IAM-based namespaces.

https://github.com/ibm-functions/iam-token-manager-nodejs

@jthomas
Copy link
Contributor Author

jthomas commented May 29, 2019

Should also provide a mechanism to add service access policies to Cloud Functions namespace for other services.

@dpittner
Copy link

I've a patch available that adds IAM, however there seems #167 introduced a regression, e.g. applying the patch to an earlier version works. #172

@jthomas
Copy link
Contributor Author

jthomas commented Jun 12, 2019

@dpittner Could you open an issue with details on the regression and I'll have a look?

@jthomas
Copy link
Contributor Author

jthomas commented Jul 5, 2019

I've started work on this feature.
9e6930f

I also want to add support to use the ibmcloud iam oauth-tokens command to automatically create the token rather than having to manually provision and use API keys.

@jthomas
Copy link
Contributor Author

jthomas commented Jul 18, 2019

More work on this issue has enabled support for API keys and using .bluemix/config.json for tokens (with auto-refresh).

Need to add the following....

  • Update documentation with these new features.
  • Add additional checks that config file exists
  • Add helpful errors messages when user is not logged in.

@jthomas jthomas added this to the 0.19.0 milestone Jul 22, 2019
@jthomas
Copy link
Contributor Author

jthomas commented Jul 22, 2019

This feature is blocked until IBM Cloud Functions APIGW supports configuration using IAM API keys.

@bn326160
Copy link

Any update on this? I don't seem to be able to create a new cloud foundry namespace any longer

@bn326160
Copy link

I got it to work using a valid APIGW_ACCESS_TOKEN & IAM_NAMESPACE_API_KEY in your .wskprops or ENV variables. And then upgrading to the github version of this package:
npm i git+https://github.com/serverless/serverless-openwhisk.git

@raheel-ahmad
Copy link

@bn326160 can you explain a bit further how to set the valid token and api key in .wskprops.
My .wskprops looks like this:
image

I am getting this error when deploying:
Failed to deploy function (myservice-dev-hello) due to error: PUT https://us-south.functions.cloud.ibm.com/api/v1/namespaces/_/actions/myservice-dev-hello?overwrite=true Returned HTTP 401 (Unauthorized) --> "The supplied authentication is invalid"

Looking forward to your response.

Thanks

@bn326160
Copy link

@raheel4839 Looks like you're missing IAM_NAMESPACE_API_KEY. + Did you install the github version?

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

4 participants