summaryrefslogtreecommitdiffstats
path: root/client/go/cmd/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'client/go/cmd/config.go')
-rw-r--r--client/go/cmd/config.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/client/go/cmd/config.go b/client/go/cmd/config.go
index 30db45c2bd2..1680e1d32b5 100644
--- a/client/go/cmd/config.go
+++ b/client/go/cmd/config.go
@@ -206,10 +206,12 @@ func (c *Config) UseAPIKey(system vespa.System, tenantName string) bool {
}
// If no Auth0 token is created, fall back to tenant api key, but warn that this functionality is deprecated
// TODO: Remove this when users have had time to migrate over to Auth0 device flow authentication
- a, err := auth0.GetAuth0(c.AuthConfigPath(), system.Name, system.URL)
- if err != nil || !a.HasSystem() {
- printWarning("Defaulting to tenant API key is deprecated.", "Use Auth0 device flow: 'vespa auth login' instead")
- return util.PathExists(c.APIKeyPath(tenantName))
+ if !isCI() {
+ a, err := auth0.GetAuth0(c.AuthConfigPath(), system.Name, system.URL)
+ if err != nil || !a.HasSystem() {
+ printWarning("Use of API key is deprecated", "Authenticate with Auth0 instead: 'vespa auth login'")
+ return util.PathExists(c.APIKeyPath(tenantName))
+ }
}
return false
}