Skip to content

Better handling when target Object Storage service lacks a service-key #7

Open
@joshisa

Description

@joshisa
boilerup@macrox ~ $ cf os auth myObjectStorage
Authenticating with org [email protected] / space dev as [email protected]...

FAILED
Failed to fetch a new set of credentials (Try running `cf login`): Failed to locate target service's credentials: Could not find credentials for target service

boilerup@macrox ~ $ cf service-keys myObjectStorage
Getting keys for service instance myObjectStorage as [email protected]...
No service key for service instance myObjectStorage

boilerup@macrox ~ $ cf create-service-key myObjectStorage myCreds
Creating service key myCreds for service instance myObjectStorage as [email protected]...
OK

boilerup@macrox ~ $ cf os auth myObjectStorage
Authenticating with org [email protected] / space dev as [email protected]...
OK

Authenticated with myObjectStorage
boilerup@macrox ~ $

Observation: Failure to fetch a new set of credentials provides guidance for trying cf login. However, the root cause can also be the lack of a service-key as well.

Suggestion(s):

  1. Update the error message to also guide users to investigate whether a service-key exists and to leverage cf create-service-key if one is not present.

  2. Perhaps we could provide a flag (or simply default) to auto-creation of a service-key for the service instance under investigation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions