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

Namespace list command fails with 401 status code on OpenFaaS Enterprise cluster with IAM enabled. #990

Closed
1 of 2 tasks
welteki opened this issue Nov 24, 2023 · 0 comments

Comments

@welteki
Copy link
Member

welteki commented Nov 24, 2023

Expected Behaviour

Expect the command faas-cli namespace list to show a list of namespaces the user is authorized for.

Current Behaviour

Running the command faas-cli namespace list fails with message: Check authorization, status code: 401

Why do you need this?

The faas-cli should be able to list namespaces on OpenFaaS clusters using IAM.

Who is this for?

What company is this for? Are you listed in the ADOPTERS.md file?

Are you a GitHub Sponsor (Yes/No?)

Check at: https://github.com/sponsors/openfaas

  • Yes
  • No

List All Possible Solutions and Workarounds

Looks like the issue was introduced with the addition of the namespace sub-command.

This is either an issue with the OpenFaaS go-sdk and the way it handles authentication or this is an issue with how the SDK is used in the CLI.

Reverting to CLI version 0.16.14 and using the now deprecated faas-cli namespaces command does work as expected.

Which Solution Do You Recommend?

Steps to Reproduce (for bugs)

  1. Setup an OpenFaaS Enterprise cluster with IAM.
  2. Ensure you are authenticated and have permissions to list namespaces.
  3. Run the command faas-cli namespace list

Context

Ran into the issue after upgrading to the latest version of the faas-cli.

Discovered the issue on an OpenFaaS Enterprise cluster with IAM enabled.

Your Environment

  • FaaS-CLI version ( Full output from: faas-cli version ):
CLI:
 commit:  9981e9ea7065d5dc2d4a17013aca04a1c97fe4df
 version: 0.16.18
  • Docker version ( Full output from: docker version ):
Client: Docker Engine - Community
 Version:           24.0.5
 API version:       1.43
 Go version:        go1.20.6
 Git commit:        ced0996
 Built:             Fri Jul 21 20:35:18 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       311b9ff
  Built:            Thu Oct 26 09:07:41 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.24
  GitCommit:        61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
 runc:
  Version:          1.1.9
  GitCommit:        v1.1.9-0-gccaecfc
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
  • Are you using Docker Swarm (FaaS-swarm ) or Kubernetes (FaaS-netes)?
faas-netes
  • Operating System and version (e.g. Linux, Windows, MacOS):
Ubuntu Linux
  • Link to your project or a code example to reproduce issue:
@welteki welteki changed the title Namespace list command fails with 401 status code Namespace list command fails with 401 status code on OpenFaaS Enterprise cluster with IAM enabled. Nov 24, 2023
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

1 participant