Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ build/
# Dependency directories (remove the comment below to include it)
# vendor/
dist/

# Built connector binaries
/baton-demo
/connector
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ linters:
- usestdlibvars
- whitespace
settings:
gomoddirectives:
# Stacked on baton-sdk#941 (machine-credential vending) until it merges.
# Remove this allow-list and the go.mod replace once #941 is released.
replace-allow-list:
- github.com/conductorone/baton-sdk
exhaustive:
default-signifies-exhaustive: true
gocritic:
Expand Down
100 changes: 96 additions & 4 deletions baton_capabilities.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
{
"@type": "type.googleapis.com/c1.connector.v2.ConnectorCapabilities",
"resourceTypeCapabilities": [
{
"resourceType": {
"id": "agent",
"displayName": "Agent",
"traits": [
"TRAIT_AGENT"
],
"annotations": [
{
"@type": "type.googleapis.com/c1.connector.v2.SkipEntitlementsAndGrants"
}
]
},
"capabilities": [
"CAPABILITY_SYNC",
"CAPABILITY_TARGETED_SYNC"
],
"permissions": {}
},
{
"resourceType": {
"id": "assumable_role",
"displayName": "Assumable Role",
"traits": [
"TRAIT_ROLE"
],
"annotations": [
{
"@type": "type.googleapis.com/c1.connector.v2.SkipEntitlementsAndGrants"
}
]
},
"capabilities": [
"CAPABILITY_SYNC",
"CAPABILITY_TARGETED_SYNC"
],
"permissions": {}
},
{
"resourceType": {
"id": "group",
Expand All @@ -16,6 +54,25 @@
],
"permissions": {}
},
{
"resourceType": {
"id": "nhi_app",
"displayName": "NHI App",
"traits": [
"TRAIT_APP"
],
"annotations": [
{
"@type": "type.googleapis.com/c1.connector.v2.SkipEntitlementsAndGrants"
}
]
},
"capabilities": [
"CAPABILITY_SYNC",
"CAPABILITY_TARGETED_SYNC"
],
"permissions": {}
},
{
"resourceType": {
"id": "project",
Expand Down Expand Up @@ -57,6 +114,25 @@
],
"permissions": {}
},
{
"resourceType": {
"id": "secret",
"displayName": "Secret",
"traits": [
"TRAIT_SECRET"
],
"annotations": [
{
"@type": "type.googleapis.com/c1.connector.v2.SkipEntitlementsAndGrants"
}
]
},
"capabilities": [
"CAPABILITY_SYNC",
"CAPABILITY_TARGETED_SYNC"
],
"permissions": {}
},
{
"resourceType": {
"id": "user",
Expand All @@ -77,7 +153,8 @@
"CAPABILITY_ACCOUNT_PROVISIONING",
"CAPABILITY_RESOURCE_DELETE",
"CAPABILITY_RESOURCE_CREATE",
"CAPABILITY_CREDENTIAL_ROTATION"
"CAPABILITY_CREDENTIAL_ROTATION",
"CAPABILITY_CREDENTIAL_ISSUE"
],
"permissions": {}
}
Expand All @@ -92,24 +169,39 @@
"CAPABILITY_ACTIONS",
"CAPABILITY_TARGETED_SYNC",
"CAPABILITY_EVENT_FEED_V2",
"CAPABILITY_SERVICE_MODE_TARGETED_SYNC"
"CAPABILITY_SERVICE_MODE_TARGETED_SYNC",
"CAPABILITY_CREDENTIAL_ISSUE"
],
"credentialDetails": {
"capabilityAccountProvisioning": {
"supportedCredentialOptions": [
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_NO_PASSWORD",
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_RANDOM_PASSWORD",
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_ENCRYPTED_PASSWORD"
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_ENCRYPTED_PASSWORD",
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_API_KEY",
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_KEYPAIR",
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_TOKEN"
],
"preferredCredentialOption": "CAPABILITY_DETAIL_CREDENTIAL_OPTION_RANDOM_PASSWORD"
},
"capabilityCredentialRotation": {
"supportedCredentialOptions": [
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_RANDOM_PASSWORD",
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_NO_PASSWORD",
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_ENCRYPTED_PASSWORD"
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_ENCRYPTED_PASSWORD",
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_API_KEY",
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_KEYPAIR",
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_TOKEN"
],
"preferredCredentialOption": "CAPABILITY_DETAIL_CREDENTIAL_OPTION_RANDOM_PASSWORD"
},
"capabilityCredentialIssue": {
"supportedCredentialOptions": [
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_API_KEY",
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_KEYPAIR",
"CAPABILITY_DETAIL_CREDENTIAL_OPTION_TOKEN"
],
"preferredCredentialOption": "CAPABILITY_DETAIL_CREDENTIAL_OPTION_API_KEY"
}
}
}
34 changes: 28 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ module github.com/conductorone/baton-demo
go 1.25.2

require (
github.com/conductorone/baton-sdk v0.9.18
github.com/conductorone/baton-sdk v0.13.2
github.com/doug-martin/goqu/v9 v9.19.0
github.com/ennyjfrick/ruleguard-logfatal v0.0.2
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/quasilyte/go-ruleguard/dsl v0.3.22
github.com/segmentio/ksuid v1.0.4
github.com/stretchr/testify v1.11.1
go.uber.org/zap v1.28.0
google.golang.org/grpc v1.81.0
google.golang.org/protobuf v1.36.11
Expand All @@ -17,31 +18,38 @@ require (
require (
filippo.io/age v1.2.1 // indirect
filippo.io/edwards25519 v1.1.1 // indirect
github.com/DataDog/zstd v1.5.7 // indirect
github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/RaduBerinde/axisds v0.1.0 // indirect
github.com/RaduBerinde/btreemap v0.0.0-20260105202824-d3184786f603 // indirect
github.com/aws/aws-lambda-go v1.47.0 // indirect
github.com/aws/aws-sdk-go-v2 v1.41.7 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.10 // indirect
github.com/aws/aws-sdk-go-v2/config v1.32.17 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.19.16 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.23 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.1.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.23 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.23 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.24 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.9 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.15 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.23 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.23 // indirect
github.com/aws/aws-sdk-go-v2/service/lambda v1.88.5 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.101.0 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.0.11 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.30.17 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.21 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.42.1 // indirect
github.com/aws/smithy-go v1.25.1 // indirect
github.com/benbjohnson/clock v1.3.5 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cockroachdb/crlib v0.0.0-20251122031428-fe658a2dbda1 // indirect
github.com/cockroachdb/errors v1.11.3 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/pebble/v2 v2.1.5 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/swiss v0.0.0-20251224182025-b0f6560f979b // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/conductorone/dpop v0.2.6 // indirect
github.com/conductorone/dpop/integrations/dpop_grpc v0.2.4 // indirect
github.com/conductorone/dpop/integrations/dpop_oauth2 v0.2.5 // indirect
Expand All @@ -51,30 +59,43 @@ require (
github.com/ebitengine/purego v0.10.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.3.3 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/getsentry/sentry-go v0.27.0 // indirect
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jellydator/ttlcache/v3 v3.3.0 // indirect
github.com/klauspost/compress v1.18.6 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 // indirect
github.com/magiconair/properties v1.8.9 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/maypok86/otter/v2 v2.3.0 // indirect
github.com/minio/minlz v1.0.2-0.20260119185444-845e64f85661 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/ncruces/go-strftime v1.0.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/pquerna/cachecontrol v0.2.0 // indirect
github.com/pquerna/xjwt v0.4.0 // indirect
github.com/pquerna/xjwt/xkeyset v0.0.0-20241217022915-10fc997b2a9f // indirect
github.com/prometheus/client_golang v1.16.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/sagikazarmark/locafero v0.7.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/shirou/gopsutil/v4 v4.26.4 // indirect
Expand All @@ -84,7 +105,6 @@ require (
github.com/spf13/cobra v1.10.2 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/spf13/viper v1.19.0 // indirect
github.com/stretchr/testify v1.11.1 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tklauser/go-sysconf v0.3.16 // indirect
github.com/tklauser/numcpus v0.11.0 // indirect
Expand Down Expand Up @@ -125,3 +145,5 @@ require (
)

// replace github.com/conductorone/baton-sdk => ../baton-sdk

replace github.com/conductorone/baton-sdk => github.com/conductorone/baton-sdk v0.13.2-0.20260610210931-80798d8302a1
Loading
Loading