Closed Archer57 closed 5 months ago
In addition: I tested the "custom" provider in my configuration as well as BTP. The custom provider doesn't accept a "idpDomain" parameter, so I removed it. The result was the same: With localhost, my custom IdP get's accessed and wdi5 authenticates itself before accessing the app. When changing the base-url to a deployed version, wdi5 instead accesses the domain of the app configured in the base-url and tries to authenticate there, which fails.
what happens when you call up the deployed app by hand, in a browser? Does the authentication then work as expected?
what happens when you call up the deployed app by hand, in a browser? Does the authentication then work as expected?
Yes, the authentication works when accessing the deployed app manually.
when accessing the app manually, is the redirect app
ā IdP UI for credentials happening automatically, e.g. w/o manually choosing one of multiple available IdPs?
Because we have two IdPs in use, the redirect doesn't happen automatically. That's why I sepcified the "idpDomain" in the wdio conf.
then this is the root cause of it all ā¢: wdi5
currently doesn't support > 1 IdPs with its authentication configuration. Providing idpDomain
is only valid in an IAS-scenario and has no effect with a "custom IdP" config.
ā there'd be additional functionality necessary in https://github.com/ui5-community/wdi5/blob/main/src/lib/authentication/CustomAuthenticator.ts for making > 1 IdP configurable in wdi5
Want to give it a shot @Archer57 (hint hint nudge nudge)? šø
Thanks for the reply @vobu! This helps me for the most part and I may have a more detailed look into the code after my holidays. One question remaining: One of the two IdPs is a IAS-scenario where I intend to use the BTP authenticator. Shouldn't that work even if the app doesn't redirect to the IdP by default as long as I specify the "idpDomain"?
unfortunately not - in the IAS case, no automatic redirect is triggered via the idpDomain
option. Instead, wdi5
uses the domain in idpDomain
to set the appropriate cookie to prevent biometric auth requirements.
hey š - silence for 30 days š¤ ... anybody? š
Hi, quick update from my side:
I solved the problem by configuring a manual authentication in the before hook of the actual test run.
First, I switched the setting skipInjectUI5OnStart
to true
so the Test doesn't crash when accessing the non-ui5 page of our uaa service.
Then I perform the authentication steps using wdio and calling .injectUI5()
at the end.
Lastly, I moved my manual authentication to a seperate module so it can be imported & reused easily in every test case.
Thanks for the input here! Maybe this brings up an idea on how to handle uaa services with multiple IdPs, but regarding my case, the problem is solved.
hey š - silence for 30 days š¤ ... anybody? š
Describe the bug
When configuring authentication against a custom IdP and a base url against a locally running ui5 app that requires a valid session, wdi5 access the custom IdP, checks for the specified fields, authenticates with the configured credentials, sets a session cookie and accesses the local app. Result: wdi5 can access the local app and the tests run.
When configuring authentication against a custom IdP and a base url against a ui5 app that is deployed in a Cloud Foundry space, wdi5 doesn't access the custom IdP, goes to the deployed app with an unauthorized session and fails.
To Reproduce
wdi5_username
andwdi5_password
with valid credentials.debug
.Expected behavior wdi5 can access the deployed app and the tests run.
Actual behavior wdi5 doesn't access the IdP and therefore is unable to access the deployed app.
Logs/Console Output Placeholders:
Screenshots
Runtime Env (please complete the following information):
wdi5/wdio-ui5-service
-version: 2.0.2UI5
version: 1.108.22wdio
-version: 8.19.0node
-version: 18.17.1Additional context Add any other context about the problem here, e.g. any options the target browser is started with like
--headless
or if the tests run in a CI environment