Skip to content

Commit 2ffbdbf

Browse files
committed
Change creds to alwasy pass in except for Version and Help
Add aditional CMDs not neeting AuthN details Changes per latest Review
1 parent 5805469 commit 2ffbdbf

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

plugins/confluent/confluent.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,19 @@ func ConfluentCLI() schema.Executable {
1313
Runs: []string{"confluent"},
1414
DocsURL: sdk.URL("https://docs.confluent.io/confluent-cli/current/overview.html"),
1515
NeedsAuth: needsauth.IfAll(
16-
needsauth.ForCommand("login"),
16+
needsauth.NotForHelpOrVersion(),
17+
needsauth.NotForExactArgs("local"),
18+
needsauth.NotForExactArgs("update"),
19+
needsauth.NotForExactArgs("prompt"),
20+
needsauth.NotForExactArgs("plugin"),
21+
needsauth.NotForExactArgs("logout"),
22+
needsauth.NotForExactArgs("context"),
23+
needsauth.NotForExactArgs("completion"),
24+
needsauth.NotForExactArgs("cloud-signup"),
1725
),
1826
Uses: []schema.CredentialUsage{
1927
{
20-
Name: credname.Credentials,
28+
Name: credname.UserLogin,
2129
},
2230
},
2331
}

plugins/confluent/credentials.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111

1212
func CloudCredentials() schema.CredentialType {
1313
return schema.CredentialType{
14-
Name: credname.Credentials,
15-
DocsURL: sdk.URL("https://docs.confluent.io/confluent-cli/current/command-reference/confluent_login.html"),
14+
Name: credname.UserLogin,
15+
DocsURL: sdk.URL("https://docs.confluent.io/cloud/current/access-management/identity/user-accounts.html#local-user-username-password"),
1616
ManagementURL: sdk.URL("https://confluent.cloud"),
1717
Fields: []schema.CredentialField{
1818
{

sdk/schema/credname/names.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const (
2121
PersonalAccessToken = sdk.CredentialName("Personal Access Token")
2222
RegistryCredentials = sdk.CredentialName("Registry Credentials")
2323
SecretKey = sdk.CredentialName("Secret Key")
24+
UserLogin = sdk.CredentialName("User Login")
2425
)
2526

2627
func ListAll() []sdk.CredentialName {
@@ -42,5 +43,6 @@ func ListAll() []sdk.CredentialName {
4243
PersonalAccessToken,
4344
RegistryCredentials,
4445
SecretKey,
46+
UserLogin,
4547
}
4648
}

0 commit comments

Comments
 (0)