sourcegraph/dev/sg
Robert Lin 30d50b72a2
feat/sg: add 'sg sams client create' (#63885)
Adds an equivalent to the curl command we currently share, but in `sg`.
If we add a better API around this later it's just an in-place
replacement.

Similar to https://github.com/sourcegraph/sourcegraph/pull/63883 this
"just works" with zero configuration against SAMS-dev.

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

## Test plan

```
sg sams client create -redirect-uris='https://sourcegraph.test:3443/.auth/callback' robert-testing
```

if you hit an error loading the secret, e.g. targeting the prod
instance, you get a suggestion to get Entitle access:

```
sg sams client create -redirect-uris='https://sourcegraph.test:3443/.auth/callback' -sams='https://accounts.sourcegraph.com' robert-testing
⚠️ Running sg with a dev build, following flags have different default value unless explictly set: skip-auto-update, disable-analytics
👉 Failed to get secret - do you have Entitle access to the "sourcegraph-accounts-prod-csvc" project? See https://sourcegraph.notion.site/Sourcegraph-Accounts-infrastructure-operations-b90a571da30443a8b1e7c31ade3594fb
 google(sourcegraph-accounts-prod-csvc): failed to get secret "MANAGEMENT_SECRET": rpc error: code = PermissionDenied desc = Permission 'secretmanager.versions.access' denied for resource 'projects/sourcegraph-accounts-prod-csvc/secrets/MANAGEMENT_SECRET/versions/latest' (or it may not exist).
```
## Changelog

- `sg sams client create` can now be used to create IdP clients for
SAMS.

---------

Co-authored-by: Erik Seliger <erikseliger@me.com>
2024-07-19 13:41:28 -07:00
..
buf lib/enterpriseportal: initial service API for RFC 885 (#62263) 2024-05-15 12:58:55 -07:00
ci feat(sg: add list-build subcommand to ci (#63071) 2024-06-04 13:41:44 +02:00
cloudsqlproxy feat/sg/msp: helpful error on cloudsqlproxy port conflict (#63830) 2024-07-15 11:32:37 -07:00
dependencies feat(ci): Adds playwright tests for sveltekit to bazel (#62560) 2024-06-06 12:45:05 -06:00
enterprise feat/sg: allow sg commands to default to local-dev SAMS-dev credentials (#63883) 2024-07-19 11:25:26 -07:00
internal feature/release: update sg release cut to automate stitch graph gen and release branch creation (#63794) 2024-07-18 23:15:04 -07:00
interrupt fix(sg): reduce max interrupt count and os.Exit always (#63516) 2024-06-28 10:27:02 +02:00
linters enterprise-portal: implement basic MSP IAM and RPCs (#63173) 2024-06-19 21:46:48 -04:00
msp feat/sg/msp: helpful error on cloudsqlproxy port conflict (#63830) 2024-07-15 11:32:37 -07:00
root sg gen / bazel: port generation of reference from go to bazel (#55256) 2023-07-25 12:59:39 +00:00
sams feat/sg: add 'sg sams client create' (#63885) 2024-07-19 13:41:28 -07:00
.gitignore
analytics.go feat(sg): sqlite-backed local store for sg analytics (#63578) 2024-07-09 12:47:49 +02:00
bootstrap.sh sg: pass parameters from bootstrap.sh (#43628) 2022-10-31 11:13:37 +02:00
BUILD.bazel chore/sg: remove 'sg telemetry' and related docs (#63763) 2024-07-10 17:25:04 -07:00
checks.go [sg] Watch config files (#61669) 2024-04-22 09:32:21 -07:00
Dockerfile ci: enable bazel builds for docker images (#51241) 2023-04-28 10:41:13 +02:00
generates.go sg gen buf: fix completions (#62555) 2024-05-08 10:58:55 -07:00
live.go sg: fix live command after ci build version update (#48116) 2023-02-23 14:50:47 +00:00
main_test.go chore/sg: clean up help formatting (#63860) 2024-07-16 12:01:06 -07:00
main.go fix(sg): do not try to publish analytics when it is disabled (#63800) 2024-07-12 12:45:08 +02:00
os.go dev/sg: remove globalConf, extract Config into sgconf (#33882) 2022-04-14 09:01:54 -07:00
OWNERS chore: links/ownership devx->dev-infra (#58999) 2023-12-14 15:07:20 +00:00
README.md fix: update links for dev docs (#62758) 2024-05-17 13:47:34 +02:00
sg_audit.go fix: update links for dev docs (#62758) 2024-05-17 13:47:34 +02:00
sg_backport.go chore/sg: clean up help formatting (#63860) 2024-07-16 12:01:06 -07:00
sg_bazel.go fix(sg): conditionally show protips (#63541) 2024-06-28 12:11:07 +02:00
sg_cloud.go sg: cloud - move all cloud ephemeral commands to a sub command ephemeral (#62569) 2024-05-15 15:10:15 +02:00
sg_cody_gateway.go feat(sg): add command to generate a dotcom user gateway access token (#63125) 2024-06-07 10:40:51 +00:00
sg_db.go chore(local): simplify 'sg db' inline help (#63344) 2024-06-19 14:56:13 +00:00
sg_deploy.go sg msp: initial prototype (#55905) 2023-09-07 17:24:34 -07:00
sg_doctor.go sg-binary-release: stamp with GitHub release name (#62176) 2024-04-25 08:10:55 -07:00
sg_embeddings_qa.go bazel: add no-localhost-guard lint to nogo (#59144) 2023-12-21 16:30:33 +00:00
sg_generate.go sg: improve positional completions (#58569) 2023-11-27 16:30:59 -08:00
sg_help.go sg msp: initial prototype (#55905) 2023-09-07 17:24:34 -07:00
sg_images_test.go feat(sg): add images [list|build] command (#62030) 2024-04-19 11:41:41 +00:00
sg_images.go chore/sg: clean up help formatting (#63860) 2024-07-16 12:01:06 -07:00
sg_insights.go logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
sg_install.go sg msp: initial prototype (#55905) 2023-09-07 17:24:34 -07:00
sg_lint.go Fix minor 'sg lint --help' issue(?) (#62308) 2024-04-30 21:49:48 +00:00
sg_live.go sg: improve positional completions (#58569) 2023-11-27 16:30:59 -08:00
sg_logo.go Replace all traditional for-loops (#60988) 2024-03-11 16:05:47 +02:00
sg_migration.go logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
sg_monitoring.go fix: update links for dev docs (#62758) 2024-05-17 13:47:34 +02:00
sg_ops.go sg: detect and use dockerhub registry (#61592) 2024-04-04 14:25:29 +00:00
sg_page.go logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
sg_rfc.go [sg] Make rfc command use private RFCs by default (#63902) 2024-07-18 14:12:28 +02:00
sg_run.go chore/sg: clean up help formatting (#63860) 2024-07-16 12:01:06 -07:00
sg_secret.go chore(local): make sg handle empty secret file gracefully (#63614) 2024-07-03 14:14:38 +00:00
sg_security.go feat(sg/repoferee): add security command with repo-report subcommand to fetch latest repoferee report (#62735) 2024-05-16 19:21:13 +02:00
sg_setup.go remove more remannts of OSS build (#58253) 2023-11-10 07:59:03 +00:00
sg_src.go misc fixes to text and error message copy (#58543) 2023-11-23 22:52:42 -08:00
sg_start_test.go fix(local): fix race in sg_start_test.go (#63642) 2024-07-04 19:11:10 +02:00
sg_start.go feat/sg: support correct completions on 'sg start -cmd' (#63861) 2024-07-16 12:11:11 -07:00
sg_teammate.go chore(local): simplify sg teammate (#63667) 2024-07-09 10:29:37 +02:00
sg_tests.go SG Docker Commands (#61140) 2024-03-14 21:19:47 +00:00
sg_update.go feat(sg): sqlite-backed local store for sg analytics (#63578) 2024-07-09 12:47:49 +02:00
sg_version.go sg-binary-release: stamp with GitHub release name (#62176) 2024-04-25 08:10:55 -07:00
sg_wolfi.go Build images end-to-end using Bazel v2 (#61845) 2024-04-12 16:18:43 +01:00
sg.config.example.yaml remove more remannts of OSS build (#58253) 2023-11-10 07:59:03 +00:00
sg.doctor.yaml sg: embed sg.doctor.yaml and make output stable (#60964) 2024-03-08 20:00:04 +02:00
VISION.md fix: update links for dev docs (#62758) 2024-05-17 13:47:34 +02:00

sg - the Sourcegraph developer tool

          _____                    _____
         /\    \                  /\    \
        /::\    \                /::\    \
       /::::\    \              /::::\    \
      /::::::\    \            /::::::\    \
     /:::/\:::\    \          /:::/\:::\    \
    /:::/__\:::\    \        /:::/  \:::\    \
    \:::\   \:::\    \      /:::/    \:::\    \
  ___\:::\   \:::\    \    /:::/    / \:::\    \
 /\   \:::\   \:::\    \  /:::/    /   \:::\ ___\
/::\   \:::\   \:::\____\/:::/____/  ___\:::|    |
\:::\   \:::\   \::/    /\:::\    \ /\  /:::|____|
 \:::\   \:::\   \/____/  \:::\    /::\ \::/    /
  \:::\   \:::\    \       \:::\   \:::\ \/____/
   \:::\   \:::\____\       \:::\   \:::\____\
    \:::\  /:::/    /        \:::\  /:::/    /
     \:::\/:::/    /          \:::\/:::/    /
      \::::::/    /            \::::::/    /
       \::::/    /              \::::/    /
        \::/    /                \::/____/
         \/____/

sg is the CLI tool that Sourcegraph developers can use to develop Sourcegraph. Learn more about it here.