sourcegraph/dev/sg/enterprise
Robert Lin 51bfacf851
feat/sg: allow sg commands to default to local-dev SAMS-dev credentials (#63883)
As it says on the tin - various commands related to SAMS can now target
dev services integrated against SAMS-dev directly. See test plan for
examples.

I've also refactored the `sg sams introspect-token` etc commands in
preparation for introducing more `sg sams` commands - the existing
commands are now collapsed into `sg sams token introspect` and `sg sams
token introspect -p`

Part https://linear.app/sourcegraph/issue/CORE-220, a spike into
polishing some local-dev DX for SAMS.

I also upgrade the glamour library because I noticed the JSON
pretty-printing was no longer colored - the upgrade fixed that

## Test plan

All the below now work with no additional effort:

```sh
# get token details and print a temporary token
sg sams token introspect -p
# list enterprise-portal-dev data
sg enterprise subscription list -member.cody-analytics-viewer 'robert@sourcegraph.com'
```

You can use it against locally running services that connect to SAMS-dev
as well, for example the below also works with no additional
flags/envvars:

```sh
sg start dotcom # includes enterprise-portal
sg enterprise subscription list -enterprise-portal-server=http://localhost:6081
```

## Changelog

- `sg` commands requiring SAMS client credentials now load shared
SAMS-dev client credentials by default.
2024-07-19 11:25:26 -07:00
..
BUILD.bazel feat/sg: add 'sg enterprise' commands for Cody Analytics (#63414) 2024-06-21 16:29:31 -07:00
sg_enterprise.go feat/sg: allow sg commands to default to local-dev SAMS-dev credentials (#63883) 2024-07-19 11:25:26 -07:00