Skip to content

iD oauth2 fix for prod - #195

Merged
geohacker merged 5 commits into
stagingfrom
id-oauth2-prod
Jan 5, 2023
Merged

geohacker merged 5 commits into
stagingfrom
id-oauth2-prod

Conversation

@geohacker

Copy link
Copy Markdown
Contributor

Changes to read oauth2 client id for iD editor for production.
@danrademacher the steps to deploy are:

  1. Merge this, deploy to staging and to prod, when ready
  2. Create a new oauth2 client for iD. See instructions in https://github.com/openstreetmap/openstreetmap-website/blob/master/CONFIGURE.md#oauth-consumer-keys
  3. Add the PRODUCTION_ID_APPLICATION secret in Github with the client id generated in the previous step
  4. Redeploy but pushing an empty commit.

cc @batpad @Rub21

@geohacker
geohacker changed the base branch from main to staging December 23, 2022 10:55
@danrademacher

Copy link
Copy Markdown

I just reviewed behaviors on staging, and all is working as expected. Hooray!

@geohacker based on our other recent discussions, I think the best approach is to have DevSeed handle the production deploy based on your instructions.

Would that fall to you, @batpad or @Rub21 ?

@Rub21

Rub21 commented Jan 4, 2023

Copy link
Copy Markdown
Member

@geohacker @danrademacher , I have updated the names for env var to ID_APPLICATION and create the OAuth keys, according to , https://github.com/openstreetmap/openstreetmap-website/blob/master/CONFIGURE.md#oauth-consumer-keys , I made some edition, but i could not save the changes..
image

@geohacker

geohacker commented Jan 4, 2023 •

Copy link
Copy Markdown
Contributor Author

@Rub21 I think you made a bunch of changes out of sync. I see that you have:

  1. Pushed this commit on ohm-deploy straight to staging, renaming the envvar in values.staging.template.yaml and start.sh — this is not necessary. Staging is working perfectly fine and now this change caused it to break elsewhere as you have run into.
  2. You have a PR on osm-seed that renames the existing envvar name to ID_APPLICATION and then allowing that to be read from start.sh, this was not necessary.

All we need to do is to add OSM_id_key: {{PRODUCTION_ID_APPLICATION}} in the values.production.template.yaml, create new app, put the value in Github secrets, and deploy. This is outlined in my comment above. Is there a reason why you made all the changes above?

cc @batpad

@geohacker
geohacker merged commit b54e59a into staging Jan 5, 2023
@geohacker
geohacker deleted the id-oauth2-prod branch January 5, 2023 10:10
@geohacker

Copy link
Copy Markdown
Contributor Author

@Rub21 I've fixed the error you are seeing above. This turned out to be a problem with the upstream merge, we missed the id.html.erb OpenHistoricalMap/ohm-website@0dc6558. I've updated and tested on staging. This PR is now merged.

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

Successfully merging this pull request may close these issues.

3 participants