Basic auth router not working on grid UI page - authentication fails

81 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Murali k

ungelesen,
22.11.2022, 01:05:5322.11.22
an Selenium Users
Hi Team,

Unable to add authentication to the GRID UI page in selenium grid 4 . I have setup the [router] config details in toml file. While accessing the GRID UI URL(http://ipaddress:4444/ui) it is not asking for any username and password for authentication.

Could you please guide me steps or solution to add authentication to selenium grid  Ui page in selenium grid4.

Thanks & Regards,
Murali

⇜Krishnan Mahadevan⇝

ungelesen,
22.11.2022, 01:11:1822.11.22
an seleniu...@googlegroups.com
Murali,

Can you please check if what you have as configuration matches the documentation here
Also please share the version that you are using ? Latest released version is 4.6.0 as of today.

You should see a log line such as "Requiring authentication to connect" at INFO level when you start the router which would confirm that it is honouring the username and password combination that you provided via configuration.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/d5ec4c57-4a06-48e3-9ea8-8b56d640bcaen%40googlegroups.com.

Murali k

ungelesen,
22.11.2022, 05:49:2322.11.22
an seleniu...@googlegroups.com
Hi Krishnan,

I tried with the selenium version 4.6.0. I dont see any log at INFO level mentioning that require authentication.

Authentication popuo window is not showing when accessing the Grid Ui URL. Added the router config details in toml file. 

Is there any way to customize the grid ui URL with authentication by using any classess in selenium.

For instance like we have registerbasedservlets or proxy approach.

Please guide.

Thanks & Regards,
Murali

On Tuesday, November 22, 2022, ⇜Krishnan Mahadevan⇝ <krishnan.ma...@gmail.com> wrote:
Murali,

Can you please check if what you have as configuration matches the documentation here
Also please share the version that you are using ? Latest released version is 4.6.0 as of today.

You should see a log line such as "Requiring authentication to connect" at INFO level when you start the router which would confirm that it is honouring the username and password combination that you provided via configuration.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


On Tue, Nov 22, 2022 at 11:35 AM Murali k <murali...@gmail.com> wrote:
Hi Team,

Unable to add authentication to the GRID UI page in selenium grid 4 . I have setup the [router] config details in toml file. While accessing the GRID UI URL(http://ipaddress:4444/ui) it is not asking for any username and password for authentication.

Could you please guide me steps or solution to add authentication to selenium grid  Ui page in selenium grid4.

Thanks & Regards,
Murali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLkx8V-ncS7sVOaQDL7p7Too3Xpw9_yYo4mKmSPOUQJVzA%40mail.gmail.com.

⇜Krishnan Mahadevan⇝

ungelesen,
22.11.2022, 05:52:4622.11.22
an seleniu...@googlegroups.com
Please share the command and the toml configuration files that you are working with. That would help out a lot in figuring out what is going wrong.

Grid4 does not allow for adding user defined servlets. You can however customise a node (but that's not the same as you injecting servlets).

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/

To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CADYFHtCyOugH2XE-a2JCkFTETNpcXESEz8arq4krzoQ5ksiTkg%40mail.gmail.com.

Murali k

ungelesen,
22.11.2022, 07:50:0922.11.22
an seleniu...@googlegroups.com
Hi Krishnan,

Please find the command line used to run the authentication file .

java -jar C:\selenium\selenium-server-4.6.0.jar node --port 4333 --config C:\selenium\config.toml


In config.toml file just added the route authentication.


[router]
username="admin"
password="admin"

Grid UI page is not showing any popup for the authentication.

image.png


Thanks & Regards,
Murali

⇜Krishnan Mahadevan⇝

ungelesen,
22.11.2022, 08:17:4522.11.22
an seleniu...@googlegroups.com
You are trying to setup auth for a node which is NOT going to work because the node is not user facing.

The documentation explicitly mentions that the basic auth is applicable only for the below roles

* hub
* standalone
* router

These are the 3 user facing roles of the grid.

I created a similar configuration file and then started the grid in standalone mode

Notice how the line appears 

18:21:56.044 INFO [Standalone.createHandlers] - Requiring authentication to connect

Bash
➜  grid java -jar selenium-server-4.6.0.jar standalone --config basic_auth.toml 
18:21:55.117 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
18:21:55.124 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
18:21:56.044 INFO [Standalone.createHandlers] - Requiring authentication to connect
18:21:56.074 INFO [NodeOptions.getSessionFactories] - Detected 12 available processors

18:22:11.205 INFO [NodeOptions.discoverDrivers] - Discovered 4 driver(s)
18:22:11.240 INFO [NodeOptions.report] - Adding Safari for {"browserName": "safari"} 1 times
18:22:11.242 INFO [NodeOptions.report] - Adding Edge for {"browserName": "MicrosoftEdge"} 12 times
18:22:11.243 INFO [NodeOptions.report] - Adding Chrome for {"browserName": "chrome"} 12 times
18:22:11.244 INFO [NodeOptions.report] - Adding Firefox for {"browserName": "firefox"} 12 times
18:22:11.312 INFO [Node.<init>] - Binding additional locator mechanisms: relative, id, name
18:22:11.346 INFO [GridModel.setAvailability] - Switching Node ced4d965-788c-46ec-b940-a24780cf75f0 (uri: http://172.17.24.114:4444) from DOWN to UP
18:22:11.351 INFO [LocalDistributor.add] - Added node ced4d965-788c-46ec-b940-a24780cf75f0 at http://172.17.24.114:4444. Health check every 120s
18:22:11.606 INFO [Standalone.execute] - Started Selenium Standalone 4.6.0 (revision 79f1c02ae20): http://172.17.24.114:4444
Here's the Standalone's console screenshot

image.png


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/

Murali k

ungelesen,
22.11.2022, 13:21:2622.11.22
an seleniu...@googlegroups.com
Hi Krishnan,


It is working now. Thank you for the guidence and quick response.

Is it possible to add authentication for multiple users.

Regards,
Murali
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLnZJq-LaEd5hrScvfW6bsBTH-jdjaC-yG%3Dp09nCXD4mWQ%40mail.gmail.com.

⇜Krishnan Mahadevan⇝

ungelesen,
22.11.2022, 22:28:0222.11.22
an seleniu...@googlegroups.com
No. You cannot. You can work with only one pair of credentials with the basic auth approach. If this is an absolute need, you should perhaps log a bug on the github issues page and get feedback from the committers on this on the possibility of this being added to the grid.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/

To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CADYFHtCfdU1YnSAmV9miyoOqzYZfi4939CjNghtHLGzYekaakQ%40mail.gmail.com.

Murali k

ungelesen,
22.11.2022, 23:37:0822.11.22
an seleniu...@googlegroups.com

Ok Krishnan, Thank you for the response.

Regards,
Murali


On Wednesday, November 23, 2022, ⇜Krishnan Mahadevan⇝ <krishnan.ma...@gmail.com> wrote:
No. You cannot. You can work with only one pair of credentials with the basic auth approach. If this is an absolute need, you should perhaps log a bug on the github issues page and get feedback from the committers on this on the possibility of this being added to the grid.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


On Tue, Nov 22, 2022 at 11:51 PM Murali k <murali...@gmail.com> wrote:
Hi Krishnan,


It is working now. Thank you for the guidence and quick response.

Is it possible to add authentication for multiple users.

Regards,
Murali
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLmpisqirccnLOJCnY8015iWzVY4wFPpGzRErWE95xK8Yw%40mail.gmail.com.
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten