Skip to content

add/lock in saml_2023 references, remove saml_2021 ones#8122

Merged
bleachbyte merged 8 commits intomainfrom
jp/no-more-old-saml-2021
Apr 4, 2023
Merged

add/lock in saml_2023 references, remove saml_2021 ones#8122
bleachbyte merged 8 commits intomainfrom
jp/no-more-old-saml-2021

Conversation

@bleachbyte
Copy link
Contributor

https://github.com/18F/identity-devops/issues/5739

🛠 Summary of changes

  • Removes saml2021 artifacts and suffix in saml_endpoint_configs default config; references to them now point to saml2022 if others weren't already present
  • Updates saml_2022_cert / saml_2022_key references to point to saml_2023_* instead

📜 Testing Plan

  1. Removed saml2021.crt and saml2021.key.enc artifacts for my (bleachbyte) environment
  2. Pushed up current code to my environment + built new idp hosts, verifying that hosts built properly
  3. Verified that saml2022 and saml2023 endpoints are available, while saml2021 is not a valid endpoint

Relevant logs display entries for saml2022 and saml2023 cert / key files, and none for saml2021. Site runs properly and endpoints are valid and reachable.

Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

s3_report_bucket_prefix: ''
s3_report_public_bucket_prefix: ''
saml_endpoint_configs: '[{"suffix":"2021","secret_key_passphrase":"trust-but-verify"},{"suffix":"2022","secret_key_passphrase":"trust-but-verify"}]'
saml_endpoint_configs: '[{"suffix":"2022","secret_key_passphrase":"trust-but-verify"},{"suffix":"2023","secret_key_passphrase":"trust-but-verify"}]'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to rename these files:

  • config/artifacts.example/local/saml2021.crt
  • config/artifacts.example/local/saml2021.key.enc

I we wanted to be really kind to ourselves, we'd regenerate them, I just openssl -cert'd the 2022 one and it expired in 2021

(it also looks like we just symlinked 2023 to 2022)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that not covered in these edits here?

I'm also fine with removing the 2022 one(s) and just having the 2023 ones everywhere.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they work, but I guess we should remove the 2021 files from the repo if they're no longer referenced

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, I completely missed that we had actual sample cert files there, too. I'll remove and re-test.

bleachbyte and others added 2 commits April 4, 2023 11:13
- remove the old saml2021 .crt and .key.enc files as they're no longer used/valid
- change saml2023 .crt and .key.enc to actual files (vs. symlinks),
  newly created with openssl req -newkey (etc.)

changelog: Internal, SAML, remove saml2021 references (identity-devops#5739)

describe SamlEndpoint do
let(:path) { '/api/saml/auth2022' }
let(:path) { '/api/saml/auth2023' }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't sure about these since they were 2 years prior, thank you for confirming!

Command:

git grep -l auth2022 -- spec | xargs perl -p -i -e 's/auth2022/auth2023/g' --
git grep -l logout2022 -- spec | xargs perl -p -i -e 's/logout2022/logout2023/g' --
git grep -l authpost2022 -- spec | xargs perl -p -i -e 's/authpost2022/authpost2023/g'
@zachmargolis
Copy link
Contributor

A few specs had 2022 harcoded, so I started updating those to 2023. This upgrade process is a huge bummer, I wish we could make this a little more dynamic

@zachmargolis
Copy link
Contributor

tests pass 🚀

@bleachbyte bleachbyte merged commit 71794b1 into main Apr 4, 2023
@bleachbyte bleachbyte deleted the jp/no-more-old-saml-2021 branch April 4, 2023 17:51
aduth added a commit to 18F/identity-saml-sinatra that referenced this pull request Apr 12, 2023
Avoid 404 when signing in to local development IdP, which no longer includes 2021 endpoints.

See: 18F/identity-idp#8122
aduth added a commit to 18F/identity-saml-sinatra that referenced this pull request Apr 12, 2023
Avoid 404 when signing in to local development IdP, which no longer includes 2021 endpoints.

See: 18F/identity-idp#8122
jc-gsa pushed a commit that referenced this pull request Apr 19, 2023
* saml_2022 -> saml_2023; remove saml_2021 stuff

* changelog: Internal, SAML, remove saml2021 references (identity-devops#5739)

* update example cert files in config/artifacts.example/local/

- remove the old saml2021 .crt and .key.enc files as they're no longer used/valid
- change saml2023 .crt and .key.enc to actual files (vs. symlinks),
  newly created with openssl req -newkey (etc.)

changelog: Internal, SAML, remove saml2021 references (identity-devops#5739)

* Update specs to 2023

* Replace auth2022

Command:

git grep -l auth2022 -- spec | xargs perl -p -i -e 's/auth2022/auth2023/g' --

* Replace logout2022

git grep -l logout2022 -- spec | xargs perl -p -i -e 's/logout2022/logout2023/g' --

* Update authpost2022

git grep -l authpost2022 -- spec | xargs perl -p -i -e 's/authpost2022/authpost2023/g'

* Update one last spec

---------

Co-authored-by: Zach Margolis <zachary.margolis@gsa.gov>
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.

2 participants