Spring Security Flashcards

1
Q

OATH : Authorisation Server –> creates the tokens JWT(Jason WebToken) using RSA public/private keys
Resourse Server –> accepts/denies the tokens . Using the public key provided by the Authorisation Server.
The key is encoded!

A

Authorisation Server –> creates the tokens JWT(Jason WebToken) using RSA public/private keys
Resourse Server
–> accepts/denies the tokens . Using the public key provided by the Authorisation Server.
–>maven dep: spring-boot-starter-oath2-resource-server
The key is encoded!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

Servlet Staks vs reactive stack?????????

A

Servlet Staks vs reactive stack?????????

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

OAth usage

A
  1. In your MVC restful implementation:
    modify class SecurityFilterChain to add .and().oath2ResourceServer().jwt()
  2. In the RestTemplate client, calling the MVC restful service:
    - use maven dep: spring-boot-starter-oath2-client
    - in application.properties add the stadard oath2 client settings:
    rest.template.rootUrl=http://localhost:8080

spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:9000
spring.security.oauth2.client.registration.springauth.client-id=messaging-client
spring.security.oauth2.client.registration.springauth.client-secret=secret
spring.security.oauth2.client.registration.springauth.scope[0]=message.read
spring.security.oauth2.client.registration.springauth.scope[1]=message.write
spring.security.oauth2.client.registration.springauth.authorization-grant-type=client_credentials
spring.security.oauth2.client.registration.springauth.provider=springauth
spring.security.oauth2.client.provider.springauth.authorization-uri=http://localhost:9000/auth2/authorize
spring.security.oauth2.client.provider.springauth.token-uri=http://localhost:9000/oauth2/token

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Using OAth2 in the client(RestTemplate)

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly