Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
876a0aa
add mcp_server API specs
YouNeedCryDear Aug 22, 2025
2b39859
add autogenerated code
YouNeedCryDear Aug 22, 2025
f21972e
initiate OEP for mcp support
YouNeedCryDear Aug 22, 2025
36ee811
update OEP 5 with MCP support
YouNeedCryDear Aug 22, 2025
fe0343c
remove redundant sections
YouNeedCryDear Aug 22, 2025
6b6a56a
update inline permission profile
YouNeedCryDear Aug 22, 2025
447d6b4
update generated code
YouNeedCryDear Aug 22, 2025
85af93f
add additional validation for specs
YouNeedCryDear Aug 22, 2025
2f77a9b
auto generated code
YouNeedCryDear Aug 22, 2025
04cf5e8
fix oep 05 readme
YouNeedCryDear Aug 22, 2025
f7864d7
update oep 0005 doc
YouNeedCryDear Aug 22, 2025
a662fed
remove specs for container from mcp server spec
YouNeedCryDear Sep 9, 2025
55a2f45
init commit for mcp_gateway spec
YouNeedCryDear Sep 9, 2025
3580071
updated MCP server specs
YouNeedCryDear Sep 9, 2025
12a4f41
rename to podspec
YouNeedCryDear Sep 10, 2025
a58ba21
add dedicated auth
YouNeedCryDear Sep 10, 2025
b08c22c
init commit for mcp gateway crd
YouNeedCryDear Sep 11, 2025
e30cd79
refactor mcp CRD
YouNeedCryDear Sep 11, 2025
04de4a4
move features inside gateway features instead of specs
YouNeedCryDear Sep 12, 2025
e299754
update MCP gateway specs
YouNeedCryDear Sep 12, 2025
9bc811d
add protocol version in gateway spec
YouNeedCryDear Sep 12, 2025
2751615
additional policy for gateway to client connection
YouNeedCryDear Sep 12, 2025
6b7ca0f
fix violation and format issue
YouNeedCryDear Sep 12, 2025
f3e0878
add auto generated files for MCP
YouNeedCryDear Sep 12, 2025
924dbcb
remove federation related marker
YouNeedCryDear Sep 12, 2025
76c7d0b
update auto generated files
YouNeedCryDear Sep 12, 2025
ef76cc3
update oep 0005
YouNeedCryDear Sep 12, 2025
0963ebb
update design doc for MCP server and gateway
YouNeedCryDear Sep 12, 2025
6877511
remove auto generated mcp code
YouNeedCryDear Sep 25, 2025
80d5056
Revert "remove auto generated mcp code"
YouNeedCryDear Sep 25, 2025
b90f94d
remove auto generated yaml
YouNeedCryDear Sep 25, 2025
d871c10
undo auto generated code for review
YouNeedCryDear Sep 25, 2025
0cad20c
remove oep to separate PR
YouNeedCryDear Sep 30, 2025
0ff9cf9
remove transport from MCPGateway
YouNeedCryDear Sep 30, 2025
7baa75a
remove cluster scoped MCP crd
YouNeedCryDear Sep 30, 2025
36a63a4
use v1alpha1 as API version for MCP
YouNeedCryDear Sep 30, 2025
e1b66dc
remove observability from gateway specs
YouNeedCryDear Sep 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 144 additions & 0 deletions pkg/apis/ome/v1alpha1/auth_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
package v1beta1

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// AuthMethod defines the authentication method to use.
// +kubebuilder:validation:Enum=None;Bearer;ApiKey;Basic;JWT;ClientCertificate;OAuth2
type AuthMethod string

const (
AuthMethodNone AuthMethod = "None"
AuthMethodBearer AuthMethod = "Bearer"
Copy link
Collaborator

Choose a reason for hiding this comment

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

bear token and api key are the same thing?

AuthMethodApiKey AuthMethod = "ApiKey"
AuthMethodBasic AuthMethod = "Basic"
Copy link
Collaborator

Choose a reason for hiding this comment

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

basic means user credential right?

AuthMethodJWT AuthMethod = "JWT"
AuthMethodClientCertificate AuthMethod = "ClientCertificate"
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is mtls?

AuthMethodOAuth2 AuthMethod = "OAuth2"
)

// CredentialRef provides a reference to a secret containing authentication credentials.
type CredentialRef struct {
// SecretRef references a Kubernetes secret containing the credential.
// +optional
SecretRef *corev1.SecretKeySelector `json:"secretRef,omitempty"`

// Value contains the credential value directly (not recommended for sensitive data).
// +optional
Value string `json:"value,omitempty"`

// HeaderName specifies the header name for API key authentication.
// +optional
HeaderName string `json:"headerName,omitempty"`
}

// AuthConfig provides unified authentication configuration for all components.
type AuthConfig struct {
Copy link
Collaborator

Choose a reason for hiding this comment

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

i would scope this down to
• Bearer tokens / API keys
• OAuth2 / OIDC flows

// Method defines the authentication method to use.
// +kubebuilder:validation:Required
Method AuthMethod `json:"method"`

// Token provides the authentication token (Bearer, API Key).
// +optional
Token *CredentialRef `json:"token,omitempty"`

// Basic provides basic authentication credentials.
// +optional
Basic *BasicCredentials `json:"basic,omitempty"`

// JWT provides JWT authentication configuration.
// +optional
JWT *JWTCredentials `json:"jwt,omitempty"`

// ClientCert provides client certificate authentication.
// +optional
ClientCert *ClientCertCredentials `json:"clientCert,omitempty"`

// OAuth2 provides OAuth2 authentication configuration.
// +optional
OAuth2 *OAuth2Credentials `json:"oAuth2,omitempty"`

// Timeout defines the authentication request timeout.
// +kubebuilder:default="30s"
// +optional
Timeout *metav1.Duration `json:"timeout,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we have timeout in auth section?

}

// BasicCredentials defines basic authentication credentials.
type BasicCredentials struct {
// Username for basic authentication.
// +kubebuilder:validation:Required
Username string `json:"username"`

// Password references the password secret.
// +kubebuilder:validation:Required
Password CredentialRef `json:"password"`
}

// JWTCredentials defines JWT authentication credentials.
type JWTCredentials struct {
// SigningKey references the JWT signing key secret.
// +kubebuilder:validation:Required
SigningKey CredentialRef `json:"signingKey"`

// Algorithm defines the JWT signing algorithm.
// +kubebuilder:validation:Enum=HS256;HS384;HS512;RS256;RS384;RS512;ES256;ES384;ES512
// +kubebuilder:default=RS256
// +optional
Algorithm string `json:"algorithm,omitempty"`

// Issuer defines the expected JWT issuer.
// +optional
Issuer string `json:"issuer,omitempty"`

// Audience defines the expected JWT audience.
// +optional
Audience string `json:"audience,omitempty"`

// ExpirationTolerance defines tolerance for token expiration.
// +kubebuilder:default="30s"
// +optional
ExpirationTolerance *metav1.Duration `json:"expirationTolerance,omitempty"`
}

// ClientCertCredentials defines client certificate authentication.
type ClientCertCredentials struct {
Copy link
Collaborator

Choose a reason for hiding this comment

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

how does it integrate with things such as cert manager and other cloud cert management

// CertificateRef references the client certificate secret.
// +kubebuilder:validation:Required
CertificateRef CredentialRef `json:"certificateRef"`

// PrivateKeyRef references the private key secret.
// +kubebuilder:validation:Required
PrivateKeyRef CredentialRef `json:"privateKeyRef"`

// CARef references the CA certificate secret for verification.
// +optional
CARef *CredentialRef `json:"caRef,omitempty"`

// VerifyServerCert controls whether to verify the server certificate.
// +kubebuilder:default=true
// +optional
VerifyServerCert *bool `json:"verifyServerCert,omitempty"`
}

// OAuth2Credentials defines OAuth2 authentication credentials.
type OAuth2Credentials struct {
// ClientID for OAuth2 authentication.
// +kubebuilder:validation:Required
ClientID string `json:"clientID"`

// ClientSecret references the OAuth2 client secret.
// +kubebuilder:validation:Required
ClientSecret CredentialRef `json:"clientSecret"`

// TokenURL is the OAuth2 token endpoint.
// +kubebuilder:validation:Required
TokenURL string `json:"tokenURL"`

// Scopes define the OAuth2 scopes to request.
// +optional
// +listType=set
Scopes []string `json:"scopes,omitempty"`
}
Loading
Loading