Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Configure a certificate and private key for each response #227

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

Zogoo
Copy link
Collaborator

@Zogoo Zogoo commented Nov 5, 2024

This PR removes public and private key dependency from low-layer logic. This will allow the application can directly pass the certificates to the signing logic instead of using a config that is shared between threads.

At the controller level, I am still passing config values if the value is not provided, which makes it safer for existing gem users.

Additionally, I'm fixing ruby syntax and hash argument to make it developer-friendly.

This PR will revert Proc approach for set certificate and private key. Because I think those approaches basically trying to achieve the same thing. They need to set up their certificate for each request (not persist the entire app).

For example #209 (comment)

zogoo and others added 21 commits July 25, 2024 00:50
* Allow SP config force signature validation

* Allow SP config force signature validation

Tested with Slack with Authn request signature option
---------

Co-authored-by: zogoo <ch.tsogbadrakh@gmail.com>
I have tested with live SAML SP apps and it works fine

* Unspecified certifciate from SP metadata

---------

Co-authored-by: zogoo <ch.tsogbadrakh@gmail.com>
* Set minimum test coverage (saml-idp#207)

* Set minimum test coverage to a very high value for testing

* Update minimum coverage to actual current value

* Try with proper way to update helper method

* Correctly decode and mock with correct REXML class

* Drop the min coverage

---------

Co-authored-by: Mathieu Jobin <majobin@mdsol.com>
Co-authored-by: zogoo <ch.tsogbadrakh@gmail.com>
* wip add error collector

* Fix type and rewrite request with proper validation test cases

* Lead error render decision to gem user

* Validate the certificate's existence before verifying the signature.

---------

Co-authored-by: zogoo <ch.tsogbadrakh@gmail.com>
Co-authored-by: zogoo <ch.tsogbadrakh@gmail.com>
* Remove duplications

* Pre-conditions need to be defined in before section

* Le's not test logger in here

---------

Co-authored-by: zogoo <ch.tsogbadrakh@gmail.com>
* Pass ref id as Session Index

* Official Rails 8 is not released yet to RubyGem until that let's stick official older version

---------

Co-authored-by: zogoo <ch.tsogbadrakh@gmail.com>
Co-authored-by: zogoo <ch.tsogbadrakh@gmail.com>
@Zogoo Zogoo requested a review from jphenow November 5, 2024 00:59
@Zogoo Zogoo self-assigned this Nov 5, 2024
@Zogoo Zogoo changed the title [fix] Remove configs from low layer logics [fix] Configure a certificate and private key for each response Nov 5, 2024
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.

1 participant