PORTWORX-ENTERPRISE-PROFESSIONAL practice question 13 of 15

After enabling security in Portworx, the pxctl command returns an “access denied” error. What action must be taken to allow pxctl to gain access again?

Full set: 75 questions
Answer options
A: Pass both the --user and --password command line flags to the pxctl command. Username and password combination can be found in the px-admin-token secret.
B: The administrator must create a new pxctl context by running pxctl context create and passing the -token command line parameter. Correct answer
C: Authentication is impossible because an authentication token was not generated before enabling security on the cluster.
Correct Answer:
B. The administrator must create a new pxctl context by running pxctl context create and passing the -token command line parameter.
Explanation

When Portworx security is enabled, all pxctl commands require an authentication token. Portworx automatically generates a default administrator token and stores it in a Kubernetes secret named px-admin-token. To regain access, the administrator must retrieve this token from the secret and use it to create a new authenticated pxctl context. This context will then be used for all subsequent pxctl commands, providing the necessary authentication to interact with the secured cluster.

Why Incorrect

A. pxctl does not use --user and --password flags for authentication. It uses a JWT token, which is found in the px-admin-token secret, not a username/password combination.
C. This is incorrect. When security is enabled, Portworx automatically generates a default system administrator token, ensuring that an administrator can always access the cluster.

References

1. Portworx Enterprise Documentation, "Authenticate with Portworx": This official guide details the process after enabling security. It states, "When you enable security, Portworx generates a default system.admin token and stores it as a Kubernetes secret called px-admin-token... Use this token to create a context for pxctl". It then provides the exact pxctl context create admin --token=$TOKEN command. (Reference: Portworx Enterprise Documentation -> Secure -> Security with Kubernetes -> Authenticate with Portworx).

2. Portworx Enterprise Documentation, "pxctl reference": The command reference for pxctl context create shows the --token flag as the method for providing the authentication token when creating a new context for a secured cluster. There are no --user or --password flags listed for this purpose. (Reference: Portworx Enterprise Documentation -> Reference -> CLI Reference -> pxctl -> pxctl context create).

Scroll to Top