Use project UUID#69293
Conversation
69bd791 to
260d5fc
Compare
# Conflicts: # dashboard/db/schema.rb
This reverts commit a43cc45.
06edb41 to
6bc898f
Compare
unlox775-code-dot-org
left a comment
There was a problem hiding this comment.
This looks safe from a security perspective. I don't know the code enough to approve it's stability.
I did leave a comment on function structure. This looks great overall!!
fe8a4bc to
8abb187
Compare
This reverts commit a1bfd5d.
Hamms
left a comment
There was a problem hiding this comment.
LGTM! I have one question and one suggestion for simplification, but neither are blocking.
Thanks for all the care and caution you've put into this! I'm excited for us to take the next step
| raise ArgumentError, "`encrypted` must be a string" unless encrypted.is_a? String | ||
|
|
||
| if uuid?(encrypted) | ||
| project = Projects.table.where(uuid: encrypted).first || Project.find_by(uuid: encrypted) |
There was a problem hiding this comment.
Is it worth extracting this to a helper method somewhere? Would also make for a nice spot to put a comment explaining some of the strangeness around this whole Sequel-inside-Rails pattern we've got here
There was a problem hiding this comment.
I attempted this, but was getting a test error on drone I couldn't replicate locally. I don't want to get stuck on this, so I will go ahead and merge without and revisit separately.
This is the third PR in a series of PRs to migrate our existing channel token system for projects to unique identifiers. This PR starts using UUIDs to identify projects, while continuing to support legacy channel tokens. To decrease risk, the change is locked behind a DCDO flag
project-uuid-in-urlLinks
Testing story
Tested on an adhoc: https://adhoc-use-project-uuid-studio.cdn-code.org
Follow-up work
Now that we're using UUIDs, we need to work towards getting rid of channel tokens
3. Backfill project UUIDs (#69294)
4. Update the UUID column to be non-null
5. Eventually completely remove old channel token support
Privacy and Security
This PR is the third step in further securing our projects.