oktadev / okta-spring-boot-saml-example

Spring Boot, SAML, and Okta
https://developer.okta.com/blog/2022/08/05/spring-boot-saml
Apache License 2.0
79 stars 57 forks source link

can't run it! #7

Closed maiziheimei closed 5 years ago

maiziheimei commented 6 years ago

there is an error, I have completely followed your blog. Could you give me a hint? Thanks!

screen shot 2018-08-01 at 16 37 45
neuzhouyi0117 commented 5 years ago

hi, i also have the error. check on the Synchronize Computer Time Settings with Internet. It will be work.

dharmendra25 commented 5 years ago

Can Anyone create a new SpringBoot App with SAML2.0 and OKTA plz.... I am facing issues, while creating SAML2.0 Template App in OKTA. it's not showing Saml2.0 config in Sign-on Tab.

mraible commented 5 years ago

Hello everyone. I'm sorry for not responding sooner - I missed this issue and your comments somehow.

@maiziheimei and @neuzhouyi0117 I just went through my Spring Boot + SAML tutorial again (using Spring Boot 2.1.3 this time) and everything worked without problems. Can you please try again, or compare your code to the code in this repo?

SmartSynchronize is a great tool for comparing directories. I've used Beyond Compare in the past too.

@dharmendra25 You are correct. Thanks to your comment, I discovered this morning that oktapreview.com orgs do have the SAML option. Accounts on okta.com do NOT. I've reported this to our team. I'll comment on this issue when it's fixed.

dharmendra25 commented 5 years ago

Thanks @mraible for your quick reply.

I will wait for your response after it get fixed.

nbarbettini commented 5 years ago

Hey @dharmendra25 - thanks for reporting this. Can you give me some more info on what you are building with Spring Boot + SAML? Are you adding Okta authentication (via SAML) to an existing app?

dharmendra25 commented 5 years ago

Hi @nbarbettini, Thank you for your quick reply. I was trying to build a simple sping boot web application with OKTA authentication via SAML2.0 by referring @mraible's post but i belive it was with old posts and i didn't get any updated post for OKTA site with new SAML2.0 (deprecated) setup.

It will be helpful, if you could create a new simple spring boot web application with OKTA authentication via SAML2.0 (deprecated) template.

Thank you for your help in advance.

Please let me know, if you require any more information from my end.

mraible commented 5 years ago

@dharmendra25 If you create an account using https://www.okta.com/integrate/signup/, you'll have 1) the classic UI by default, and 2) the ability to create SAML applications. I'm in the process of fixing the post.

dharmendra25 commented 5 years ago

Hey @mraible , I took code from ur hithub link and created an application in okta. Also chnaged the metadata url in properties file and also generated key.

But after doing all , i am unable to access https://localhost:8443/ Error:

org.apache.coyote.http11.AbstractHttp11Processor process INFO: Error parsing HTTP request header

mraible commented 5 years ago

Have you tried generating a new certificate? The README in this project shows you how.

On Mar 12, 2019, at 04:36, dharmendra25 notifications@github.com wrote:

Hey @mraible , I took code from ur hithub link and created an application in okta. Also chnaged the metadata url in properties file and also generated key.

But after doing all , i am unable to access https://localhost:8443/ Error:

org.apache.coyote.http11.AbstractHttp11Processor process INFO: Error parsing HTTP request header

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

dharmendra25 commented 5 years ago

@mraible After adding the meta url in the properties file, i used below command to generate keystore in my saml directory: keytool -genkey -v -keystore keystore.jks -alias spring -keyalg RSA -keysize 2048 -validity 10000

with password "secret".

Is their any thing i left for the setup?

mraible commented 5 years ago

I'm not sure what your issue is @dharmendra25. I re-did my tutorial a couple of weeks ago and didn't have any problems.

neuzhouyi0117 commented 5 years ago

Thanks for you help. the sample source can work now!

At 2019-03-15 00:43:31, "Matt Raible" notifications@github.com wrote:

I'm not sure what your issue is @dharmendra25. I re-did my tutorial a couple of weeks ago and didn't have any problems.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

neuzhouyi0117 commented 5 years ago

one more question for help. how to logout with the sample source code. Can you give me a logout sample source code for studying the saml2.0

At 2019-03-15 00:43:31, "Matt Raible" notifications@github.com wrote:

I'm not sure what your issue is @dharmendra25. I re-did my tutorial a couple of weeks ago and didn't have any problems.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

mraible commented 5 years ago

@neuzhouyi0117 I asked the Spring Security team for a logout example in May 2017. There are comments on that issue that show how to log out. I haven't tried the suggestions myself.