Spaceship::UnauthorizedAccessError: Unauthorized Access thrown 8 hours after deployment
- Dominant language
- Ruby
- Stars
- 879
- Forks
- 190
- PR merge metrics
- No merged PRs in 30d
Description
#### The issue:
We've deployed boarding to a Docker container hosted on our internal application platform and we are able to successfully add new Beta Testers after deployment.
However, after about 8 hours, users trying to sign up start to see the following error in the UI:
```
Something went wrong, please contact the application owner: Unauthorized Access
```
I checked the application logs after a failed sign up attempt and I see the following:
```
April 6th 2020, 09:59:14.101 | #
April 6th 2020, 09:59:14.101 | /usr/local/bundle/ruby/2.6.0/gems/fastlane-2.126.0/spaceship/lib/spaceship/client.rb:844:in `send_request'
April 6th 2020, 09:59:14.101 | /boarding/app/services/boarding_service.rb:57:in `block in add_tester'
April 6th 2020, 09:59:14.101 | Could not add (email address) to app: (our app name)
```
#### What I'd like to be able to do:
Deploy boarding in a way that doesn't require frequent maintenance to resolve these issues.
#### What I've tried:
1. I've seen some chatter of 2FA being enabled having some impact on this, however, the ITC_USER specified is an App Manager role that does not have 2FA enabled so I don't believe this is related.
2. I've also tried passing in a valid FASTLANE_SESSION (generated via command line) by setting
`export FASTLANE_SESSION=(the fastlane session)` prior to `bundle exec puma -C config/puma.rb` being executed by our app platform. In doing so, I see `Session loaded from environment variable is not valid. Continuing with normal login.` in the application logs – Googling this leads me right back to the 2FA conversations.
I've also looked through the docs and seemingly related GitHub issues, however, I haven't been able to find anything conclusive.
Thanks in advance for your help in resolving this.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with boarding/app/services/boarding_service.rb:57 and follow the request into fastlane's spaceship/lib/spaceship/client.rb:844. Reproduce the failure after deployment while checking how ITC_USER and FASTLANE_SESSION are loaded and expire; done means identifying a reliable authentication approach that avoids recurring maintenance and verifying sign-up afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100