Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

authentication hides important error information #68

Open
wallyworld opened this issue Aug 7, 2018 · 0 comments
Open

authentication hides important error information #68

wallyworld opened this issue Aug 7, 2018 · 0 comments
Assignees

Comments

@wallyworld
Copy link
Member

In authernticatingClient doAuthenticate(), we return a generic error string when there's an authentication error:

if authDetails, err = c.authMode.Auth(c.creds); err != nil {
return gooseerrors.Newf(err, "authentication failed")
}

And also further down in the method when there's other types of error, eg

if err := c.createServiceURLs(); err != nil {
return gooseerrors.Newf(err, "cannot create service URLs")
}

This makes it hard for callers (eg juju) to distinguish between auth errors and other errors. goose does have an UnauthorisedError code so that should be used where appropriate.

@vinu2003 vinu2003 self-assigned this Aug 10, 2018
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

No branches or pull requests

2 participants