0

My spring boot project contains more than 10 modules, with Cassandra DB. i want to do the security with the separate module. Is this possible?

Meg
  • 109
  • 2
  • 2
  • 12

1 Answers1

0

Can you provide a little more info. Are you just looking to keep your security code in a separate maven/gradle module? If so that would work just like any other project, you shouldn't need anything specific.

Brian Demers
  • 2,051
  • 1
  • 9
  • 12
  • yes. separate maven module. because, In some cases i need to change parent maven project. So if it is in separate module which is more convenient to me.... – Meg Oct 04 '17 at 05:25
  • how to write custom realm for the application? shiro.ini is only enough or any other class/interface needs to implement for achieve shiro authentication? – Meg Oct 04 '17 at 15:55
  • Take a look at https://shiro.apache.org/realm.html - You can use any of the existing Realms as a guide (if you can explain your use case a bit more someone might be able to get you a better link) – Brian Demers Oct 05 '17 at 19:35
  • Thanks Brian, I have 3 roles, ADMIN,USER,GUEST. here i need to create realm for Cassandra db. how can i start this configuration ? – Meg Oct 06 '17 at 10:05
  • Take a look at: http://grokbase.com/t/cassandra/user/13ccsk1ky4/password-authentication-advice – Brian Demers Oct 09 '17 at 19:28
  • Brian, i want to authenticate and authorize my page using apache shiro. Still I have no idea how to start this implementation. Because UI pages are in separate microservice, and shiro authentication will be in separate microsevice. How can I authenticate a page, on every hit of login? – Meg Oct 11 '17 at 17:21
  • It depends, these are really broad questions without many details. You may want to start a new thread. – Brian Demers Oct 12 '17 at 18:11
  • I am also struggling with the similar kind of issue. Actually, I have 10 modules in a spring boot application and one module is responsible for security. In Security module (JAR), I am using Apache Shiro and JWT (as a token provider). Till the basic authentication, everything works fine But after getting Token, When I am calling my current module's endpoint by passing Bearer token, after validating token it is throwing 404 ( My Spring controller endpoints are not found). Is there any additional configuration required in Shiro filter? – MV53 Oct 13 '17 at 09:24
  • My configurations are below: `@Bean public ShiroFilterChainDefinition shiroFilterChainDefinition() { DefaultShiroFilterChainDefinition chainDefinition = new DefaultShiroFilterChainDefinition(); chainDefinition.addPathDefinition("/JWTProvider/**", "authcBasic[permissive]"); chainDefinition.addPathDefinition("/api/**", "jwtv"); return chainDefinition; }` – MV53 Oct 13 '17 at 09:26
  • Im still not started with shiro. From UIService, I submitted login details, then using feign clients uiserivce is communicating with authenticationservice. I am going to write shiro implementation in authentication service. My doubt is, i need to write shiro.ini and realm class or any other bean to inject? – Meg Oct 15 '17 at 14:00
  • Please open new threads, we would love to help but there are a couple different questions here – Brian Demers Oct 16 '17 at 14:20
  • Thank you brian, I will create a new thread. And one more I have configured authenticatication service with feign clients(separate module). – Meg Oct 16 '17 at 16:40