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 SAML Service Provider Support #7260

Merged
merged 1 commit into from
Sep 6, 2019

Conversation

fhanik
Copy link
Contributor

@fhanik fhanik commented Aug 15, 2019

Simple SAML 2 authentication.

Copy link
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

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

Thanks, @fhanik, for all your hard work to put this PR together! I've left some feedback inline. I'd also recommend before merging that we add unit tests and java doc.

Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @fhanik! I provided feedback inline.

@fhanik fhanik self-assigned this Aug 20, 2019
Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

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

I provided some feedback inline

public static void main(String[] args) {
Log log = LogFactory.getLog(Saml2ServiceProviderStarterApplication.class);
log.info("Starting SAML 2 Sample Application");
SpringApplication.run(
Copy link
Member

Choose a reason for hiding this comment

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

We need to ensure we log a ticket to Boot to ensure it doesn't automatically create a user

2019-08-22 10:25:49.114  INFO 27629 --- [           main] .s.s.UserDetailsServiceAutoConfiguration : 

Using generated security password: 801c42c2-5167-4761-80f4-4fd7b3103ba0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe this is my fault. I left in a test configuration

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO

* limitations under the License.
*/

package org.springframework.security.saml2.serviceprovider.provider;
Copy link
Member

Choose a reason for hiding this comment

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

Rename the package to align with OAuth codebase by changing provider to registration

Copy link
Contributor

@jzheaux jzheaux Aug 27, 2019

Choose a reason for hiding this comment

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

The package for oauth resource server is org.springframework.security.oauth2.server.resource with an anticipated org.springframework.security.oauth2.server.authorization.

Would it be better to call this org.springframework.security.saml2.provider.service with an anticipated org.springframework.saml2.provider.identity? (And subsequently, org.springframework.saml2.provider.service.registration)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed

Copy link
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

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

Thanks for the last update, @fhanik! I've left some additional feedback inline.

fhanik added a commit to fhanik/spring-security that referenced this pull request Aug 27, 2019
fhanik added a commit to fhanik/spring-security that referenced this pull request Aug 27, 2019
fhanik added a commit to fhanik/spring-security that referenced this pull request Aug 27, 2019
fhanik added a commit to fhanik/spring-security that referenced this pull request Aug 27, 2019
fhanik added a commit to fhanik/spring-security that referenced this pull request Aug 27, 2019
@fhanik fhanik force-pushed the feature/saml2-sp-mvp branch from 5ce7c97 to 0b30c14 Compare August 27, 2019 22:00
Copy link
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

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

Thanks, @fhanik, I've left a bit more feedback inline.

fhanik added a commit to fhanik/spring-security that referenced this pull request Aug 29, 2019
fhanik added a commit to fhanik/spring-security that referenced this pull request Aug 29, 2019
@fhanik fhanik force-pushed the feature/saml2-sp-mvp branch 3 times, most recently from 2b5ff9c to c5df8d8 Compare September 5, 2019 21:28
Implements minimal SAML 2.0 login/authentication functionality with the
following feature set:

  - Supports IDP initiated login at the default url of /login/saml2/sso/{registrationId}
  - Supports SP initiated login at the default url of /saml2/authenticate/{registrationId}
  - Supports basic java-configuration via DSL
  - Provides an integration sample using Spring Boot

Not implemented with this MVP

  - Single Logout
  - Dynamic Service Provider Metadata

Fixes spring-projectsgh-6019
@fhanik fhanik force-pushed the feature/saml2-sp-mvp branch from c5df8d8 to e9a44bc Compare September 5, 2019 21:40
@fhanik fhanik merged commit 08d5086 into spring-projects:master Sep 6, 2019
@fhanik fhanik deleted the feature/saml2-sp-mvp branch September 6, 2019 15:42
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