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

Support other OIDC providers #311

Open
etiennej70 opened this issue Jul 13, 2023 · 1 comment
Open

Support other OIDC providers #311

etiennej70 opened this issue Jul 13, 2023 · 1 comment

Comments

@etiennej70
Copy link

Support other OIDC providers

Summary

URL check performed for discovery URL is too restrictive and can only be compatible with keycloack products. It should be possible to configure other OIDC providers.

Why?

Not using keycloack provider.

How

Modify check on discovery-url in pkg/config/config.go

Currently it is :

func (r *Config) extractDiscoveryURIComponents() error {
	reg := regexp.MustCompile(
		`(?P<legacy>(/auth){0,1})/realms/(?P<realm>[^/]+)(/{0,1}).*`,
	)

	matches := reg.FindStringSubmatch(r.DiscoveryURI.Path)

	if len(matches) == 0 {
		return apperrors.ErrBadDiscoveryURIFormat
	}

	legacyIndex := reg.SubexpIndex("legacy")
	realmIndex := reg.SubexpIndex("realm")

	if matches[legacyIndex] != "" {
		r.IsDiscoverURILegacy = true
	}

	r.Realm = matches[realmIndex]
	return nil
}

Can be modify by inserting directly the /.well-known/openid-configuration in the discovery-url parameter

Acceptance criteria

Be able to use another OIDC provider (google, ping federate, 0Auth, ...)

Additional Information

N/A

@p53
Copy link

p53 commented Jul 14, 2023

hi, we already has this request here several times, if we would like to support also other IDP providers it is not just about changing this url, we would need to restrict/remove also other features/refactor/test code to be able to fit also for other providers, so it is not just about changing this one thing it is whole more complex thing. I already tried it with google, that maybe seems good candidate for next provider and i have idea maybe how to do it in a way that would scale but in short term i don't think more providers will be supported (depends on how much time i will have)

@p53 p53 added this to the 2.10.0 milestone Nov 4, 2023
@p53 p53 modified the milestones: 2.10.0, 2.11.0 Apr 5, 2024
@p53 p53 removed this from the 2.11.0 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To do
Development

No branches or pull requests

2 participants