Bypassing the gmail verification pages for automation Test - python-3.x

I'm currently using robotframework to automate test on the web to perform various functions with our app. All of our Test require you login to gmail, the problem is when we run the automation half the time the test fails since google ask for a verification code. I'm using a headless browser cloud solution to run the test. Has anyone run into this issue?

In link How to Secure Your Gmail Account With 2-Step Verification refer section Disable 2-Step Verification in Gmail, . That should help.

Security Checks should NEVER be BYPASSED
You can do the following, by following the below approach you would be merely taking another option of verification(THIS IS NOT BYPASS).
go to
https://myaccount.google.com/
Search bar - search for "app passwords"
Register your app as one of the below cases and generate password, use the same for your log-ins.
Register your app as any one of the following, I suggest you register as either mail/custom app and then proceed with your testing.
Mail
Calendar
Contacts
Youtube
Custom
Less secure apps & your Google Account
Check out this link if nothing works, and use this as the last resort.

Related

How to use nodemailer within new Google policy?

Well, it's quite simple actually... I'm trying to use nodemailer but everytime a try to call the mailer fucntion, it returns an auth error. I searched the error and apparently it's cause because of Google "less secure apps access" (https://myaccount.google.com/lesssecureapps) option, it has to be enabled, but the problem is: since may 30th of 2022, Google updated it's policy, and no longer has this option, so i can't use nodemailer in gmail anymore?
enter image description here
enter image description here
I tried to search the problem and find how to enable the "access to less secure apps" on Google gmail account configuration, but since Google updated it's policy, and they removed that option, i can't find any other solution. I didn't find anyone else with this problem either.
if you enabled 2fa on your google account you can create an apps password.
you can then use the apps password in place of your actual Gmail password in your Code
how to create an apps password

Disable Captcha (Login Challenge) For Google Login

I try to login to my google account with using HtmlUnit like Login to gmail using HtmlUnit
But I encounter with Captcha on password step. I tried to disable it with https://accounts.google.com/DisplayUnlockCaptcha but it didn't work. Any idea?
Note: By the way it is a g-suite account and I'm sure that code is working.
A captcha is what would be called a "login challenge". Since it is a Google Workspace (G Suite) account, I would recommend you to turn it OFF for 10 minutes in case you are an admin, otherwise, if you do not have the access to do it yourself, you can ask your admin.
Login challenges can not be turned OFF in Google accounts unless you set up 2 factor authentication.
Used selenium headless instead of htmlunit and solved problem.
Step 1
pip install undetected-chromedriver
Step 2
enter link description here

starter questions with docusign auth/clickwrap php api

I am trying to implement the clickwrap process and am using the php SDK.
When going through Auth via the Authorization Code Grant method and as part of the process it is asking for a login before completing the process. I've used my dev account details however why is this step needed as we are already passing through various keys/id?
Is this specific to the development environment or will this also happen in prod?
What will be presented to the end-user who does not have a Docusign Account?
I understand the 'obtain user consent' and can work that into the workflow but this is confusing.
I have worked through the Quickstart app as well and that has the same process. Have I misunderstood something?
If you want a page on your application to include a DocuSign clickwrap agreement, then you do not need to use the Click api. (It really should be named the Click Management API.)
What you do: follow the instructions for adding a clickwrap agreement shown in the Click User Guide.
The Click Q & A page is also helpful.
The "Click API" is only needed if you want to programmatically look up the Click agreements, modify the Click configuration, etc.
If you're just building an app that would ask for user to agree to a clickwrap using DocuSign Click, you won't need the end-user to authenticate.
I suggest you look at https://myclickwrap.sampleapps.docusign.com/myclickwrap/ and the code in GitHub.
Your app needs the creds to make API calls, but you could use JWT for example with one-time consent and your APP will not make these API calls on behalf of anyone, but just for the one user that the account uses.
All of this is the same in the developer env or production.

Custom Users when using Jenkins Google Login Plugin

I am attempting to our company's Jenkins from the Jenkins user database + matrix based security to using Google Login Plugin and Role based strategy plugin to give us better control of our user accounts.
With this new set up I am wondering how I could go about creating a designated user which is used by scripts which trigger Jenkins jobs remotely. I would like to do this without having to add a user to our company's GSuite account as this costs a few $ per month. Before the switch to Google Login I could just create a user manually in the Jenkins user database and take the API token from there but since switching to Google Login there is no option to add a user (which makes sense given than the users are managed by Google now). At the moment it seems like I have to choose from:
Use the old approach and forget about authenticating through google. This is not a great result as we want to minimize the number of user accounts we have to set up for new people joining the company to overhead of onboarding.
Use Google Login Plugin and create a new dedicated "Jenkins" user in GSuite for these scripting / requirements. This costs money.
Use an existing users API Token to avoid the cost of a new Google User in our GSuite account. This seems like bad practice which I'll regret at some point.
Is there a workaround which doesn't require a designated GSuite user or repurposing an existing Google users credentials just for this purpose?
I did a similar research a while ago and it seems like there is no way to do so right now.
However, I'm using SAML plugin with GSuite instead of Google Login Plugin, but from Jenkins security perspective I assume they work in the same way.
When you're using such plugin, Jenkins creates a securityRealm in its config. In my case it is:
<securityRealm class="org.jenkinsci.plugins.saml.SamlSecurityRealm" plugin="saml#1.0.7">
Therefore, to have SAML and Jenkins security matrix work simultaneously, you have to have several security realms.
Here is a ticket, which describes this issue, but it's still open
Regards!
I was also looking at how to trigger builds remotely when using the Google Login Plugin.
I ended up using the "Build Token Root Plugin" which solved this problem, without any need to create a dedicated user for this.
This plugin offers an alternate URI pattern which is not subject to the usual overall or job read permissions. Just issue an Http GET or POST to buildByToken/build?job=NAME&token=SECRET. This URI is accessible to anonymous users regardless of security setup, so you only need the right token.
https://wiki.jenkins.io/display/JENKINS/Build+Token+Root+Plugin

Google Multiple Sign-ins - Is there a way to specify the account in the URL?

We recently switched our team to Google Apps and with that, everyone got a Google Apps account . However, for those of us with a GMail account as well, this makes it so that bringing up Gmail in your browser opens up either your personal account or your Google apps account.
Even though GMail has multiple Sign-ins enabled for both of my accounts, I still have to spend time switching through both accounts.
I was wondering if there was a way to specify the account I wanted to use in the URL directly, which would allow me to create a bookmark for GMail for both of these accounts:
something like:
http://mail.google.com?a=firstaccount#gmail.com
http://mail.google.com?a=workaccount#googleappsdomain.com
I just don't believe anyone at Google has never thought of this! :-)
The same question applies to all of Google's services too I guess (docs, sites, etc...)
https://mail.google.com/a/googleappsdomain.com/
This works like a charm, with one exception: regular gmail.com accounts. https://mail.google.com/mail/ will direct you to the inbox for whichever account you logged in as first. My work around has been to make sure I log into my personal e-mail first (but this at least avoids having to log into the rest in a specific order).
For an access to multiple gmail adresse you can use this :
https://accounts.google.com/ServiceLoginAuth?continue=http://mail.google.com/gmail&service=mail&Email=yourname#gmail.com

Resources