Skip to content

Conversation

@kaivol
Copy link

@kaivol kaivol commented Jan 1, 2026

Simplify the account setup wizard by removing an unnecessary initial WebFinger query that was previously used to discover the IdP server's URL.

This URL is only used on the first login, and not saved when the client is closed. Instead, we rely on the rewrite /.well-known/openid-configuration hack.

@TheOneRing
Copy link
Contributor

I'm sorry, but as mentioned in #271 this is used in a multi tenancy scenario with independent OpenClouds.
With the unauthenticated request, we receive the actual server url.

  1. request to my-orga.example -> project1.example
  2. request project1.example

@kaivol
Copy link
Author

kaivol commented Jan 16, 2026

Thanks for the answer!

I'm sorry, but as mentioned in #271 this is used in a multi tenancy scenario with independent OpenClouds.
With the unauthenticated request, we receive the actual server url.

Could you explain what you mean with actual server url?
I'm not familiar with OpenCloud in multi-tenancy setups. This seems to be a new feature, is it documented anywhere?

Also, I don't think the description in #271 is correct.
In particular, as far as I can tell, the authentication server URL is not saved after the initial setup (at least not for subsequent launches of the client), contrary to what is shown in #271 (comment).
Also, I'm not sure if that would be desirable, as it would mean that users would need to do the setup again if the servers changes its auth configuration?

Here is how I understand the currently implemented logic:

  1. The DiscoverWebFingerServiceJobFactory gets the OIDC Issuer URL from the OpenCloud WebFinger service, which is typically set via the OC_OIDC_ISSUER environment variable.
  2. Via the SetupWizardAccountBuilder this value finds its way to the OAuthCredentialsSetupWizardState constructor, where it is assigned to the authServerUrl variable.
  3. This variable is passed to OAuthCredentialsSetupWizardPage and shown in the UI, and it is used to create an instance of OAuth. In the OAuth class, the /.well-known/openid-configuration is fetched based on this URL.
    However, this value is not saved anywhere, and after a restart the OpenCloud server's URL is used for this purpose (utilizing the rewrite /.well-known/openid-configuration hack). So we might just as well get rid of this additional logic.

Where am I missing anything here?

@TheOneRing
Copy link
Contributor

You're right, my explanation and the content of #271 is incorrect and or lacking details.
I contacted the backend team and the documentation of the web finger workflow can be found here.
https://github.com/opencloud-eu/opencloud/tree/main/services/webfinger#webfinger

@kaivol
Copy link
Author

kaivol commented Jan 22, 2026

Thanks again for the response!

If I'm not mistake, that means that my initial understanding is correct, and the current implementation (in the client) is somewhat nonsensical, isn't it? In particular, the fact that we only use the the OIDC issuer from the WebFinger for the initial account setup.

Wouldn't it make more sense to do the OIDC issuer lookup immediately before retrieving the OIDC metadata (see #776)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Qualification

Development

Successfully merging this pull request may close these issues.

2 participants