java - Multiple Spring Projects, shared authentication -
i've around 10 spring-mvc projects deployed on wildfly server @ home. these projects have been running quite while , have been private.
however few friends of mine have requested access, , i'm willing give them. i'm planning on doing building web application angularjs. application communicate spring-mvc projects calling restful endpoints. people may have access subset of services. want people register , login details or login using openid.
this results in having add authentication , authorization projects. can done spring security. don't want implement logic in each service.
is possible create service , let people login or register on service? , let other services check authentication status using service?
which spring-security security model smart use (oauth 1.0, oauth 2.0, basic authentication etc)?
is there alternative way implement requirements?
the usual solution put servers behind common authenticating proxy, serves users common-looking login page. authenticating proxy checks identity of user comparing username , password against values registered in ldap or database table, or via openid.
if authentication successful, proxy start redireting users requests server user authenticated.
each request forwarded proxy end server carries pre-authentication header containing credentials prove applications redirected request came indeed proxy, , it's not forged request.
each spring application setup not serve login page, check pre-authentication header instead. spring documentation setup pre-authentication.
have @ example of integration siteminder authentication proxy.
the core of solution users don't make requests directly end servers, goes through proxy in case needs support openid.
Comments
Post a Comment