Skip to content

feat: store client credentials in config#37

Open
HamidA1998 wants to merge 1 commit into
Permify:mainfrom
HamidA1998:feat/issue-2-credential-storage
Open

feat: store client credentials in config#37
HamidA1998 wants to merge 1 commit into
Permify:mainfrom
HamidA1998:feat/issue-2-credential-storage

Conversation

@HamidA1998
Copy link
Copy Markdown

Closes #2.

What changed

  • permctl configure now also stores token, cert_path, and cert_key in the config file.
  • core/client.New now reuses the stored credentials when creating the gRPC client:
    • Adds authorization: Bearer <token> metadata when token is configured.
    • Uses TLS when cert material is configured (CA bundle if only cert_path is set; mTLS client cert if both cert_path + cert_key are set).
  • Config file permissions are now restricted to 0600 since it can contain secrets.

Validation

  • go test ./...

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

Successfully merging this pull request may close these issues.

Endpoint, Token, Cert Path, and Cert Key Storage for CLI Tool

2 participants