Skip to content
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

[TT-11426/TT-13322]add deprecation notice for oidc middleware #6686

Merged
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apidef/api_definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,9 @@ type OIDProviderConfig struct {
ClientIDs map[string]string `bson:"client_ids" json:"client_ids"`
}

// OpenID Connect middleware support will be deprecated starting from 5.7.0.
// To avoid any disruptions, we recommend that you use JSON Web Token (JWT) instead,
// as explained in https://tyk.io/docs/basic-config-and-security/security/authentication-authorization/openid-connect/.
type OpenIDOptions struct {
Providers []OIDProviderConfig `bson:"providers" json:"providers"`
SegregateByClient bool `bson:"segregate_by_client" json:"segregate_by_client"`
Expand Down
3 changes: 3 additions & 0 deletions apidef/oas/authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,9 @@ func (h *HMAC) ExtractTo(api *apidef.APIDefinition) {
}

// OIDC contains configuration for the OIDC authentication mode.
// OIDC support will be deprecated starting from 5.7.0.
// To avoid any disruptions, we recommend that you use JSON Web Token (JWT) instead,
// as explained in https://tyk.io/docs/basic-config-and-security/security/authentication-authorization/openid-connect/.
type OIDC struct {
// Enabled activates the OIDC authentication mode.
//
Expand Down
1 change: 1 addition & 0 deletions apidef/oas/schema/x-tyk-api-gateway.json
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,7 @@
},
"X-Tyk-OIDC": {
"type": "object",
"description": "Support for external OAuth Middleware will be deprecated starting from 5.7.0. To avoid any disruptions, we recommend that you use JSON Web Token (JWT) instead, as explained in https://tyk.io/docs/basic-config-and-security/security/authentication-authorization/openid-connect/",
"properties": {
"enabled": {
"type": "boolean"
Expand Down
4 changes: 4 additions & 0 deletions gateway/mw_openid.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ func (k *OpenIDMW) Name() string {
}

func (k *OpenIDMW) EnabledForSpec() bool {
if k.Spec.UseOpenID {
log.Warn("Support for OpenID Connect Middleware will be deprecated starting from 5.7.0. To avoid any disruptions, we recommend that you use JSON Web Token (JWT) instead, as explained in https://tyk.io/docs/basic-config-and-security/security/authentication-authorization/openid-connect/")
}

return k.Spec.UseOpenID
}

Expand Down
Loading