This document covers the day-to-day development workflow for this repository, including local Go development, the two CLI programs built from cmd/, and the AWS SAM workflow used to deploy the Lambda function.
Install the following tools before contributing:
- Git
- Go 1.27 or newer — the
godirective ingo.modis1.27.2, andGOTOOLCHAIN=auto(the default) will fetch a matching toolchain if yours is older make- golangci-lint latest release (CI always runs the latest; anything older
than v2.14 cannot read Go 1.27.2 export data) — configured by the committed
.golangci.yml - AWS CLI if you want to deploy or test in AWS
- AWS SAM CLI if you want to work with the serverless deployment
- podman if you want to build or publish the container image
This repository builds two user-facing programs:
| Program | Source directory | Purpose |
|---|---|---|
idpscim |
cmd/idpscim | Main synchronization program used by Lambda, local CLI execution, and the container image |
idpscimcli |
cmd/idpscimcli | Helper CLI used to inspect Google Workspace and AWS SCIM data while validating configuration |
Local builds are written to build/:
build/idpscimbuild/idpscimcli
Run the repository quality checks in the same order the project expects:
go fix ./... # Go 1.27+ modernizers
make go-fmt # Format
make go-betteralign # Struct field alignment for memory layout
golangci-lint run ./... # Must report 0 issues
make build # Verify build
make test # Full -race suitegolangci-lint reads the committed .golangci.yml, so your results match CI.
The baseline is 0 issues — anything reported is from your change.
Run these when the relevant area changes:
# After changing any consumed interface — mocks are generated, never hand-edited
make go-generate
# After changing parsing or decoding (state file, SCIM responses)
FUZZ_TIME=30s make fuzz
# After changing dependencies
go mod verify
go run golang.org/x/vuln/cmd/govulncheck@latest ./...
# Coverage report in your browser
make go-test-coveragemake go-mod-update # go mod tidy, then `go get -u` for each direct dependency, then tidy again
make go-generate # regenerate mocks in case an interface changed shape
make testImportant
Any change under internal/model must keep
golden_hash_test.go green. It pins the hash values that
the S3 state file is compared by; if it fails, you have changed a wire format and every deployed
installation will do a full re-sync. See the
Implementation Guide.
Go 1.27 made crypto/x509.SystemCertPool honour SSL_CERT_FILE and SSL_CERT_DIR on macOS and
Windows. If either is set in your shell, local TLS verification will use those roots instead of the
system keychain, which can cause confusing certificate failures against Google or AWS endpoints.
Unset them, or set GODEBUG=x509sslcertoverrideplatform=0. Lambda runs on Linux, where this was
already the behaviour.
Build both binaries:
make buildShow the help for each program:
./build/idpscim --help
./build/idpscimcli --helpUseful idpscimcli validation commands during development:
./build/idpscimcli aws service config --help
./build/idpscimcli aws groups list --help
./build/idpscimcli gws groups list --help
./build/idpscimcli gws groups members list --help
./build/idpscimcli gws users list --helpTo cross-compile the binaries for the supported operating systems and architectures:
make build-distThis writes the artifacts to dist/.
AWS SAM is the deployment path for the Lambda version of idpscim.
export AWS_PROFILE=<profile-name>
export AWS_REGION=us-east-1
aws cloudformation validate-template \
--template-body file://template.yaml \
--profile "$AWS_PROFILE"
sam validate \
--profile "$AWS_PROFILE" \
--region "$AWS_REGION"
GIT_VERSION=dev sam build \
--profile "$AWS_PROFILE" \
--region "$AWS_REGION"Use the guided workflow the first time so you can enter the required parameters interactively:
sam deploy --guided \
--stack-name idp-scim-sync \
--capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM \
--profile "$AWS_PROFILE" \
--region "$AWS_REGION"After the first guided deployment, iterate with:
GIT_VERSION=dev sam build \
--profile "$AWS_PROFILE" \
--region "$AWS_REGION"
sam deploy \
--stack-name idp-scim-sync \
--capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM \
--profile "$AWS_PROFILE" \
--region "$AWS_REGION"Use this when you want to validate application changes against real AWS resources.
Container images are published to GitHub Container Registry using podman.
Build locally:
make build-dist
GIT_VERSION=test make container-build
podman images | grep idp-scim-syncPublish:
REPOSITORY_REGISTRY_TOKEN=<your-token> \
REPOSITORY_REGISTRY_USERNAME=<your-username> \
make container-login
GIT_VERSION=<version> make container-publish- Implementation-Guide.md — invariants, how to add a synced attribute, testing conventions, state-file compatibility rules
- Architecture.md — package topology, sync algorithm, hashing
- AWS-SAM.md for private deploys, SAR updates, and public publishing
- idpscim.md for the main sync program
- idpscimcli.md for the validation CLI
- Release.md for the release process