Skip to content

feat: adding auth_token and jwks_uri in yaml for oauth support#144

Open
Hardikl wants to merge 14 commits into
mainfrom
hl_test_a
Open

feat: adding auth_token and jwks_uri in yaml for oauth support#144
Hardikl wants to merge 14 commits into
mainfrom
hl_test_a

Conversation

@Hardikl

@Hardikl Hardikl commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Adding these in ontap.yaml

Defaults:
  auth_token: AUTH_TOKEN
  jwks_uri: http://<KEYCLOAK>/realms/<REALM>/protocol/openid-connect/certs

Copilot AI review requested due to automatic review settings June 2, 2026 10:40
@cla-bot cla-bot Bot added the cla-signed label Jun 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces optional OAuth-style bearer JWT validation for the MCP HTTP endpoint, driven by new Defaults.auth_token and Defaults.jwks_uri YAML configuration, and updates the sample config and Go module dependencies accordingly.

Changes:

  • Adds JWT verification and JWKS fetch/cache logic to the HTTP server request path.
  • Extends YAML config schema to allow auth_token and jwks_uri under Defaults.
  • Updates ontap-example.yaml and adds github.com/golang-jwt/jwt/v5 dependency.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
server/server.go Adds OAuth/JWT enforcement in the HTTP handler plus JWKS fetching/caching and JWK→RSA key conversion.
config/config.go Adds auth_token and jwks_uri fields to the Poller struct used by Defaults.
ontap-example.yaml Documents the new Defaults.auth_token and Defaults.jwks_uri settings.
go.mod Adds github.com/golang-jwt/jwt/v5 dependency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/server.go Outdated
Comment thread server/server.go
Comment thread server/server.go Outdated
Comment thread server/server.go Outdated
Comment thread server/server.go Outdated
Comment thread server/server.go Outdated
Copilot AI review requested due to automatic review settings June 4, 2026 11:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 14 comments.

Comment thread server/server.go Outdated
Comment thread server/server.go
Comment thread server/server.go Outdated
Comment thread server/server.go Outdated
Comment thread server/server.go
Comment thread integration/test/mcp_auth_test.go
Comment thread integration/test/mcp_auth_test.go Outdated
Comment thread integration/go.mod Outdated
Comment thread config/config.go
Comment thread server/server.go Outdated
Copilot AI review requested due to automatic review settings June 8, 2026 09:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 10 comments.

Comment thread server/server.go Outdated
Comment thread server/server.go
Comment thread server/server.go
Comment thread server/server.go
Comment thread server/oauth.go Outdated
Comment thread server/oauth.go Outdated
Comment thread server/oauth.go Outdated
Comment thread server/oauth.go Outdated
Comment thread config/config.go
Comment thread server/oauth.go Outdated
Comment thread server/oauth.go Outdated
Comment thread server/oauth.go Outdated
Comment thread server/server.go Outdated
Comment thread server/server.go Outdated
Comment thread server/server.go
Comment thread server/server.go Outdated
Comment thread server/server.go
Comment thread ontap-example.yaml Outdated
Comment thread ontap-example.yaml
@@ -1,4 +1,9 @@
# See https://netapp.github.io/ontap-mcp/nightly/
McpAuth:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auth is better?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just Auth or OAuth may treated as one of authentication supported on ontap as mentioned here: https://netapp.github.io/ontap-mcp/nightly/prepare-ontap/#authentication

Comment thread server/oauth.go
Copilot AI review requested due to automatic review settings June 16, 2026 11:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated 9 comments.

Comment thread server/server.go Outdated
Comment thread server/server.go
Comment thread server/server.go Outdated
Comment thread docs/mcp-oauth.md Outdated
Comment thread docs/mcp-oauth.md
Comment thread config/config.go
Comment thread integration/go.mod Outdated
Comment thread server/oauth.go Outdated
Comment thread server/server.go
Copilot AI review requested due to automatic review settings June 18, 2026 09:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 7 comments.

Comment thread server/jwks_test.go
Comment thread server/jwks_test.go
Comment thread server/server.go
Comment thread server/server.go
Comment thread server/oauth.go
Comment thread server/oauth.go
Comment thread config/config.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ontap-mcp should support OAuth Authentication

3 participants