Added support for read-only tokens

Bytesafe now supports read-only tokens. For example, these can be used in CI/CD pipelines where you only require read access or similar use cases.

Create a read-only token

To generate a read-only token use the -read-only flag. You also need to be logged in to bytesafe to generate a token.

npm token create --read-only

When asked for a password, just login to the Bytesafe Web Console and copy the password, which is accessible in your registry.

Also, if you have not set your Bytesafe registry to be used by default using npm config set <YOUR BYTESAFE REGISTRY>, then you also need specify which registry you intend to use with the --registry flag:

npm token create --read-only --registry <YOUR BYTESAFE REGISTRY>

List and revoke tokens

By default npm token create generates a token with both read and write permissions. In a CI/CD environment it is recommended to read-only tokens.

To list your current tokens you can use npm token list and to revoke you can use npm token revoke <TOKEN ID>.

read-only-tokens

If you have any questions or experience any issues, we would appreciate your feedback!