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

Add ability to sign metadata. (Improved) #213

Merged
merged 9 commits into from
Mar 26, 2015
Merged

Conversation

pitbulk
Copy link
Collaborator

@pitbulk pitbulk commented Mar 25, 2015

Related to #207.
Improved:

  • Test: Added signature validation
  • prettyprint optional on metadata generator in order to avoid signature validation problems.
  • signature position fixed. Now is placed at the top,

Fix algorithm calculator. This method was wrong

@pitbulk
Copy link
Collaborator Author

pitbulk commented Mar 25, 2015

@Lordnibbler, @luisvm what do you think about this PR?

end

it "creates a signed metadata" do
assert_match %r[<ds:SignatureValue>\s*([a-zA-Z0-9/+=]+)\s*</ds:SignatureValue>]m, xml_text
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, I originally added the two \s* in the regular expression and the m at the end of it to take into account the fact that the metadata was being pretty-printed. Now that you took out the pretty-printing for the test, these should no longer be needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

pitbulk added a commit that referenced this pull request Mar 25, 2015
xml_text = OneLogin::RubySaml::Metadata.new.generate(settings, true)
# assert correct xml declaration
start = "<?xml version='1.0' encoding='UTF-8'?>\n<md:EntityDescriptor"
assert xml_text[0..start.length-1] == start
Copy link
Contributor

Choose a reason for hiding this comment

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

probably good to use assert_equal here to be consistent

@Lordnibbler
Copy link
Contributor

comments aside looks good 👍

pitbulk added a commit that referenced this pull request Mar 26, 2015
Add ability to sign metadata. (Improved)
@pitbulk pitbulk merged commit 4927043 into master Mar 26, 2015
@pitbulk pitbulk deleted the Umofomia-sign-metadata branch March 26, 2015 13:50
@Umofomia Umofomia mentioned this pull request Apr 1, 2015
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