jeffwils / grails-spring-security-saml

Grails Spring Security SAML2.0 Plugin for Grails 3
8 stars 25 forks source link

Exclude example metadata and keystore from build #54

Closed valentingoebel closed 5 years ago

valentingoebel commented 5 years ago

The files were excluded via the jar section in build.gradle. Furthermore file checks were added to inform the user that the file is missing and which setting in the application.yml must be configured to fix the error.

I have used the following commands to confirm that the jar file does not contain the undesired files.

unzip -l build/libs/spring-security-saml-3.3.1-SNAPSHOT.jar | grep .xml
unzip -l build/libs/spring-security-saml-3.3.1-SNAPSHOT.jar | grep .jks
valentingoebel commented 5 years ago

I made a mistake... This is supposed to be merged into develop not master.

valentingoebel commented 5 years ago

I have forgotten to mention that I also added proper values to the defaultIdp examples in index.md (which also contained a misspelling 'defaultldp' with a lowercase L)

valentingoebel commented 5 years ago

Ok it looks like I messed up the check for the keystore. I will try to fix this tomorrow.

valentingoebel commented 5 years ago

Ok it looks like Spring is converting the "classpath:conf/keystore.jks" into a resource automatically and therefore expects an URI.

https://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/resources.html#resources-resourceloader

All I have to do is to replace the constructor call new ClassPathResource() with getResource().

valentingoebel commented 5 years ago

Ok this change is now ready to merge.

irstevenson commented 5 years ago

The tests for the Taglib are failing with these changes. So you'll need to fix them first.

Seen with a simple: ./gradlew clean check

:test

org.grails.plugin.springsecurity.saml.SamlTagLibSpec > loginLinkShouldSetBody FAILED
    org.spockframework.runtime.SpockComparisonFailure at SamlTagLibSpec.groovy:25

org.grails.plugin.springsecurity.saml.SamlTagLibSpec > loginLinkShouldSetClassAttribute FAILED
    org.spockframework.runtime.SpockComparisonFailure at SamlTagLibSpec.groovy:33

org.grails.plugin.springsecurity.saml.SamlTagLibSpec > loginLinkShouldSetIdAttribute FAILED
    org.spockframework.runtime.SpockComparisonFailure at SamlTagLibSpec.groovy:40

31 tests completed, 3 failed, 2 skipped
:test FAILED