Skip to content

Commit

Permalink
Merge pull request #118 from leaphub/update-security-config
Browse files Browse the repository at this point in the history
Add missing security configuration params
  • Loading branch information
hslavich committed Aug 13, 2020
2 parents 36b5f1b + ad3637f commit cef2818
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions DependencyInjection/Configuration.php
Expand Up @@ -120,6 +120,11 @@ public function getConfigTreeBuilder()
->end()
->booleanNode('signMetadata')->end()
->booleanNode('wantXMLValidation')->end()
->booleanNode('relaxDestinationValidation')->end()
->booleanNode('destinationStrictlyMatches')
->defaultTrue()
->end()
->booleanNode('rejectUnsolicitedResponsesWithInResponseTo')->end()
->booleanNode('lowercaseUrlencoding')->end()
->scalarNode('signatureAlgorithm')->end()
->scalarNode('digestAlgorithm')->end()
Expand Down
3 changes: 3 additions & 0 deletions Tests/DependencyInjection/Fixtures/full.yaml
Expand Up @@ -38,6 +38,9 @@ hslavich_onelogin_saml:
requestedAuthnContext: true
signMetadata: false
wantXMLValidation: false
relaxDestinationValidation: false
destinationStrictlyMatches: true
rejectUnsolicitedResponsesWithInResponseTo: false
signatureAlgorithm: 'http://www.w3.org/2000/09/xmldsig#rsa-sha1'
contactPerson:
technical:
Expand Down
Expand Up @@ -57,6 +57,9 @@ public function testLoadSecuritySettings()
$this->assertTrue($settings['security']['requestedAuthnContext']);
$this->assertFalse($settings['security']['signMetadata']);
$this->assertFalse($settings['security']['wantXMLValidation']);
$this->assertFalse($settings['security']['relaxDestinationValidation']);
$this->assertTrue($settings['security']['destinationStrictlyMatches']);
$this->assertFalse($settings['security']['rejectUnsolicitedResponsesWithInResponseTo']);
$this->assertEquals('http://www.w3.org/2000/09/xmldsig#rsa-sha1', $settings['security']['signatureAlgorithm']);
}

Expand Down

0 comments on commit cef2818

Please sign in to comment.