liip / liip/requests_gpgauthlib

Auth token decryption failed

Open
#13 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
6
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Hello, I have problem that some authentication attempts to our passbolt fails:

```
File "...", line 82, in login
self._session.authenticate()
File "/usr/lib/python3.7/site-packages/requests_gpgauthlib/gpgauth_session.py", line 231, in authenticate
return self.is_authenticated_with_token
File "/usr/lib/python3.7/site-packages/requests_gpgauthlib/gpgauth_session.py", line 215, in is_authenticated_with_token
user_token_result=self.user_auth_token
File "/usr/lib/python3.7/site-packages/requests_gpgauthlib/gpgauth_session.py", line 201, in user_auth_token
raise GPGAuthStage1Exception("Auth token decryption failed: %s", user_auth_token.status)
requests_gpgauthlib.exceptions.GPGAuthStage1Exception: ('Auth token decryption failed: %s', 'decryption failed')
```

```
def login(self):
self._session = GPGAuthSession(gpg=self._gpg, server_url=self.server_url)
assert self._session.server_fingerprint == self.server_fingerprint

self._session._user_passphrase = self.passphrase
self._session.authenticate()
```

Interesting thing is that it is working for approx 70% of all attempts but sometimes it ends in this exception. Repeating the authetication after failure will successfully pass. Am I doing anything wrong? Is there way how to debug it? Thanks for any advice.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at requests_gpgauthlib/gpgauth_session.py, especially user_auth_token, is_authenticated_with_token, and authenticate, and reproduce the intermittent failure using the login snippet. Compare successful and failed authentication attempts around the reported “decryption failed” status; done means the cause is understood and authentication no longer fails intermittently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.