-
Notifications
You must be signed in to change notification settings - Fork 0
feat: initial MCP server scaffold (authzen_evaluate) #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2d97a2e
feat: initial MCP server fronting an OpenID AuthZEN 1.0 PDP
kanywst ebe0442
chore: smoke test, Makefile, dependabot; README de-fluff
kanywst 0529abc
ci: pin golangci-lint v2.12.2 (action v9) — v1.64 was built with Go 1…
kanywst 8730ff6
chore: address PR review feedback
kanywst a606ed1
chore: address remaining CodeRabbit review feedback
kanywst 9411c7d
ci: add smoke / vuln / actionlint / coverage jobs
kanywst b45e05a
ci(vuln): correct osv-scanner-action path (uses subaction at osv-scan…
kanywst f8e2400
ci(vuln): drop --skip-git arg (removed in osv-scanner v2)
kanywst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: gomod | ||
| directory: / | ||
| schedule: | ||
| interval: weekly | ||
| day: monday | ||
| open-pull-requests-limit: 5 | ||
| groups: | ||
| go-deps: | ||
| patterns: ["*"] | ||
|
|
||
| - package-ecosystem: github-actions | ||
| directory: / | ||
| schedule: | ||
| interval: weekly | ||
| day: monday | ||
| open-pull-requests-limit: 5 | ||
| groups: | ||
| actions: | ||
| patterns: ["*"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| name: ci | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - run: go vet ./... | ||
| - name: Run tests with coverage | ||
| run: go test -race -count=1 -covermode=atomic -coverprofile=coverage.out -v ./... | ||
| - name: Coverage summary | ||
| run: go tool cover -func=coverage.out | tail -n 1 | ||
|
|
||
| lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9.2.1 | ||
| with: | ||
| version: v2.12.2 | ||
|
|
||
| smoke: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - name: Run end-to-end MCP smoke test (uses Python fake PDP) | ||
| run: make smoke | ||
|
|
||
| vuln: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - name: govulncheck (Go module CVE scan) | ||
| run: | | ||
| go install golang.org/x/vuln/cmd/govulncheck@latest | ||
| govulncheck ./... | ||
| - name: osv-scanner (OSV.dev cross-ecosystem scan) | ||
| uses: google/osv-scanner-action/osv-scanner-action@9a498708959aeaef5ef730655706c5a1df1edbc2 # v2.3.8 | ||
| with: | ||
| scan-args: |- | ||
| --recursive | ||
| ./ | ||
|
|
||
| actionlint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Lint GitHub Actions workflows | ||
| uses: raven-actions/actionlint@205b530c5d9fa8f44ae9ed59f341a0db994aa6f8 # v2.1.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| permissions: | ||
| contents: write | ||
| # Required for cosign keyless signing via GitHub OIDC | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
|
||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
|
|
||
| - name: Install syft | ||
| uses: anchore/sbom-action/download-syft@f8bdd1d8ac5e901a77a92f111440fdb1b593736b # v0.20.6 | ||
|
|
||
| - name: Install cosign | ||
| uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2 | ||
|
|
||
| - name: Run GoReleaser | ||
| uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0 | ||
| with: | ||
| distribution: goreleaser | ||
| version: latest | ||
| args: release --clean | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| version: 2 | ||
|
|
||
| project_name: mcp-authzen | ||
|
|
||
| before: | ||
| hooks: | ||
| # `verify` checks checksums without mutating go.mod / go.sum, so a | ||
| # release stays bit-reproducible. CI / dev should run `go mod tidy`. | ||
| - go mod verify | ||
|
|
||
| builds: | ||
| - id: mcp-authzen | ||
| binary: mcp-authzen | ||
| main: ./ | ||
| goos: | ||
| - darwin | ||
| - linux | ||
| - windows | ||
| goarch: | ||
| - amd64 | ||
| - arm64 | ||
| env: | ||
| - CGO_ENABLED=0 | ||
| ldflags: | ||
| - -s -w -X main.version={{.Version}} | ||
|
|
||
| archives: | ||
| - format_overrides: | ||
| - goos: windows | ||
| formats: [zip] | ||
| formats: | ||
| - tar.gz | ||
| name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}" | ||
| files: | ||
| - LICENSE | ||
| - README.md | ||
|
|
||
| checksum: | ||
| name_template: "{{ .ProjectName }}-{{ .Version }}-checksums.txt" | ||
|
|
||
| release: | ||
| prerelease: auto | ||
|
|
||
| sboms: | ||
| - artifacts: archive | ||
|
|
||
| signs: | ||
| - cmd: cosign | ||
| certificate: "${artifact}.pem" | ||
| args: | ||
| - "sign-blob" | ||
| - "--output-certificate=${certificate}" | ||
| - "--output-signature=${signature}" | ||
| - "${artifact}" | ||
| - "--yes" | ||
| artifacts: checksum | ||
| output: true | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| BIN := mcp-authzen | ||
| PKG := ./... | ||
|
|
||
| .PHONY: build test vet lint smoke clean fmt tidy | ||
|
|
||
| build: | ||
| go build -trimpath -ldflags "-s -w" -o $(BIN) . | ||
|
|
||
| test: | ||
| go test -race -count=1 -v $(PKG) | ||
|
|
||
| vet: | ||
| go vet $(PKG) | ||
|
|
||
| lint: | ||
| golangci-lint run $(PKG) | ||
|
|
||
| smoke: build | ||
| ./scripts/smoke.sh ./$(BIN) | ||
|
|
||
| fmt: | ||
| gofmt -s -w . | ||
|
|
||
| tidy: | ||
| go mod tidy | ||
|
|
||
| clean: | ||
| rm -f $(BIN) | ||
| rm -rf dist/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| module github.com/0-draft/mcp-authzen | ||
|
|
||
| go 1.26.3 | ||
|
kanywst marked this conversation as resolved.
|
||
|
|
||
| require github.com/mark3labs/mcp-go v0.54.1 | ||
|
|
||
| require ( | ||
| github.com/google/jsonschema-go v0.4.2 // indirect | ||
| github.com/google/uuid v1.6.0 // indirect | ||
| github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect | ||
| github.com/spf13/cast v1.7.1 // indirect | ||
| github.com/yosida95/uritemplate/v3 v3.0.2 // indirect | ||
| golang.org/x/text v0.14.0 // indirect | ||
| ) | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.