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

[easyname] provider broken (security code/2FA, REST API) #1925

Open
pannal opened this issue Jun 9, 2024 · 5 comments
Open

[easyname] provider broken (security code/2FA, REST API) #1925

pannal opened this issue Jun 9, 2024 · 5 comments

Comments

@pannal
Copy link
Contributor

pannal commented Jun 9, 2024

 Traceback (most recent call last):
   File "/usr/local/bin/lexicon", line 8, in <module>
     sys.exit(main())
   File "/usr/local/lib/python3.10/dist-packages/lexicon/cli.py", line 131, in main
     results = client.execute()
   File "/usr/local/lib/python3.10/dist-packages/lexicon/client.py", line 81, in execute
     self.provider.authenticate()
   File "/usr/local/lib/python3.10/dist-packages/lexicon/providers/base.py", line 73, in authenticate
     self._authenticate()
   File "/usr/local/lib/python3.10/dist-packages/lexicon/providers/easyname.py", line 91, in _authenticate
     self._login(csrf_token)
   File "/usr/local/lib/python3.10/dist-packages/lexicon/providers/easyname.py", line 83, in _login
     assert json_response["redirectUrl"] == self.URLS["dashboard"], (
 KeyError: 'redirectUrl'

dns-lexicon==3.11.7

@pannal
Copy link
Contributor Author

pannal commented Jun 9, 2024

After disabling 2FA in my easyname account, this happens:

Traceback (most recent call last):
  File "/usr/local/bin/lexicon", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/lexicon/cli.py", line 131, in main
    results = client.execute()
  File "/usr/local/lib/python3.10/dist-packages/lexicon/client.py", line 81, in execute
    self.provider.authenticate()
  File "/usr/local/lib/python3.10/dist-packages/lexicon/providers/base.py", line 73, in authenticate
    self._authenticate()
  File "/usr/local/lib/python3.10/dist-packages/lexicon/providers/easyname.py", line 91, in _authenticate
    self._login(csrf_token)
  File "/usr/local/lib/python3.10/dist-packages/lexicon/providers/easyname.py", line 79, in _login
    assert (
AssertionError: Could not login due to a network error.

Also, easyname has a REST API now.

@pannal
Copy link
Contributor Author

pannal commented Jun 9, 2024

The same happens with dns-lexicon==3.17.0, log:

Arguments: Namespace(delegated=None, config_dir='/root', resolve_zone_name=False, provider_name='easyname', action='create', domain='xxxx.it', type='TXT', name='_acme-challenge.xxxx.it', content='validate', ttl=10, priority=None, identifier=None, log_level='DEBUG', output='TABLE', auth_username='[email protected]', auth_password='xxxxxxxxxxxxxxx*')
Parameter resolve_zone_name is not set, use tldextract to guess the zone name from known TLDs
unable to cache publicsuffix.org-tlds.{'urls': ('https://publicsuffix.org/list/public_suffix_list.dat', 'https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat'), 'fallback_to_snapshot': True} in /root/.lexicon_tld_set/publicsuffix.org-tlds/de84b5ca2167d4c83e38fb162f2e8738.tldextract.json. This could refresh the Public Suffix List over HTTP every app startup. Construct your `TLDExtract` with a writable `cache_dir` or set `cache_dir=None` to silence this warning. [Errno 20] Not a directory: '/root/.lexicon_tld_set/publicsuffix.org-tlds'
Starting new HTTPS connection (1): publicsuffix.org:443
https://publicsuffix.org:443 "GET /list/public_suffix_list.dat HTTP/1.1" 200 86322
Actual zone name resolved for domain xxxx.it: xxxx.it
Starting new HTTPS connection (1): my.easyname.com:443
https://my.easyname.com:443 "GET /en/login HTTP/1.1" 200 None
Home response: URL=https://my.easyname.com/en/login Code=200
https://my.easyname.com:443 "POST /en/authentication-api/login HTTP/1.1" 400 79
Login response: URL=https://my.easyname.com/en/authentication-api/login Code=400
Traceback (most recent call last):
  File "/usr/local/bin/lexicon", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/lexicon/_private/cli.py", line 135, in main
    results = client.execute()
  File "/usr/local/lib/python3.10/dist-packages/lexicon/client.py", line 211, in execute
    executor = self.__enter__()
  File "/usr/local/lib/python3.10/dist-packages/lexicon/client.py", line 168, in __enter__
    raise e
  File "/usr/local/lib/python3.10/dist-packages/lexicon/client.py", line 161, in __enter__
    provider.authenticate()
  File "/usr/local/lib/python3.10/dist-packages/lexicon/_private/providers/easyname.py", line 93, in authenticate
    self._login(csrf_token)
  File "/usr/local/lib/python3.10/dist-packages/lexicon/_private/providers/easyname.py", line 83, in _login
    login_response.status_code == 200
AssertionError: Could not login due to a network error.

@pannal
Copy link
Contributor Author

pannal commented Jun 9, 2024

OK, this seems to be due to an easyname change: They now either require 2FA or a security code sent via email when logging in. I think the provider needs to be changed to use their REST API instead of crawling.

https://api-docs.easyname.com/

@pannal pannal changed the title [easyname] fails [easyname] provider broken (security code/2FA, REST API) Jun 9, 2024
@elpollodiablo
Copy link

elpollodiablo commented Jun 10, 2024

OK, this seems to be due to an easyname change: They now either require 2FA or a security code sent via email when logging in. I think the provider needs to be changed to use their REST API instead of crawling.

https://api-docs.easyname.com/

The rest api does not support changing dns records. I'm considering switching to a completely different domain provider due to this :(

@adferrand
Copy link
Collaborator

Do have have a solution using the APIs now ?

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

3 participants