question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OIDC and microservices current issues

See original GitHub issue

This is a ticket to follow up #6514 and to help discussing with @danielpetisme @mraible @sendilkumarn who are all helping here.

  • The current build is broken because we don’t have UserMapper in a microservice -> @mraible and @danielpetisme introduced a method to sync user data between the gateway and the microservices, which makes the microservices have a “User” object. However, if you choose to use DTOs (another entity which uses a DTO has a relationship to the User), this means you also need a UserMapper and a UserDTO, specific for microservices. This sounds quite complex to me!
  • Once compilation is done, we also have a testing issue. The current code (if it compiled) would fail because resourceServerProperties.getJwt().getKeyUri() is not configured in the test resources application.yml file. Configuring it wouldn’t solve the issue: you need an OIDC server to do the tests. That’s also pretty bad, as this prevents us to do unit tests unless we run that server: as this works for monoliths without doing this, we need to check how it works for monoliths, and apply the same method to gateways and microservices.
  • We need to test monoliths, gateways and microservices with Cassandra
  • When doing a gateway + microservice: create an entity in the microservice, and then create its front-end on the gateway. There is a CSRF token issue that prevents write requests to work from the gateway to the microservice - I don’t know if we should pass the CSRF token or ignore it (not sure OIDC allows CSRF attacks)
  • Swagger UI does not work with OAuth2
  • When doing a monolith, and selecting JHipster Registry, we currently force the use of JWT. We should be able to use OAuth2 also.
  • The JHipster Registry does not work with OIDC. We should do a specific Spring profile for OIDC.
  • For microservice, we need to check that doing csrf().disabled() in the Spring Security configuration doesn’t cause a security risk

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:34 (34 by maintainers)

github_iconTop GitHub Comments

2reactions
jduboiscommented, Oct 16, 2017

So the big issues are fixed, I just added a new todo on a CSRF issue - I need to check this a little bit and we’ll probably end up removing CSRF on microservices (as it basically doesn’t make any sense)

0reactions
jduboiscommented, Oct 27, 2017

Closing as everything is done

Read more comments on GitHub >

github_iconTop Results From Across the Web

OAuth and OpenID Connect for Microservices - YouTube
Jacob Ideskog - Curity - 22/10/2014Microservices present a new way of scaling API deployments, where each component is an island, ...
Read more >
Securing APIs and Microservices with OAuth and OpenID ...
Securing APIs and Microservices with OAuth and OpenID Connect ... Microservices present a new way of scaling API deployments, where each component is...
Read more >
OAuth2 and OpenID Connect for microservices and public ...
A client application requires the user to be authenticated. From the client application, the user is redirected to the Authorization Server.
Read more >
Securing Microservices with IdentityServer4, OAuth2 and ...
In this article, we're going to learn how to secure microservices with using standalone Identity Server 4 and backing with Ocelot API Gateway....
Read more >
Protecting Microservices and APIs with ABAC, OAuth and ...
By combining security capabilities such as OAuth and OIDC with a dynamic authorization solution based on the ABAC standard, an organization can ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found