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

Question: Is there a way to import client certificate to pod #373

Open
cr-liorholtzman opened this issue Mar 8, 2023 · 8 comments
Open

Comments

@cr-liorholtzman
Copy link

The company I'm working in is currently considering using Moon to replace Zalenium since it's not possible to use client-certificate when working with Zalenium

To work with a client certificate and use chrome, it is required to import it to the pod and also set "AutoSelectCertificateForUrls".
Is it something we can do using Moon? even if it means setting some specific environment variables?

@aandryashin
Copy link
Member

aandryashin commented Mar 8, 2023 via email

@aandryashin
Copy link
Member

aandryashin commented Mar 8, 2023 via email

@slunyaak
Copy link

slunyaak commented May 2, 2024

Hi,
uploading new profile in Moon pod works. But the question is how to add into profile client certificate. I have tried following: I started Moon Chrome browser, imported in it required client certificate for mutual TLS authentication and then downloaded profile. After that I followed instruction from Moon documentation in order to upload custom Chrome profile. I did make sure, that upload of new profile was successful. Unfortunately this solution did not worked. The client certificate was not present in the Moon browser after profile upload. After that I investigated that subject a little bit and I found that client certificates aren't normally stored in Chrome profile, but in host OS. So could you please advise, how to make working following solution "client mutual TLS authentication only requires client cert and key installed in browser profile"?

Thank you

@aandryashin
Copy link
Member

aandryashin commented May 2, 2024 via email

@slunyaak
Copy link

slunyaak commented May 2, 2024

Yes, I have added it, this is used code:

   ChromeOptions options = new ChromeOptions();

    options.setCapability("moon:options", Map.of("context", "http://WWeebbHHoosstt/profile.tar.gz"));

    options.addArguments("--user-data-dir=/home/user/profile");
    try {
        WebDriver driver = new RemoteWebDriver(new URL("http://MMoonnHHoosstt/wd/hub"), options);
    } catch (MalformedURLException e){

    }

@aandryashin
Copy link
Member

aandryashin commented May 2, 2024 via email

@slunyaak
Copy link

slunyaak commented May 3, 2024

Hi, thank you!, Uploading /home/user/.pki with imported client certificate using Moon context feature was the right solution.

@vania-pooh
Copy link
Member

@slunyaak so this is now resolved, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants