bhavikpatel9977 commented on issue #3488: [ZEPPELIN-4356] Zeppelin should 
stop/die/etc when can't create/access notebook repo
URL: https://github.com/apache/zeppelin/pull/3488#issuecomment-548243182
 
 
   > But you can check if classes are children of `AuthorizingRealm` or not by 
many ways including reflection. 2019년 10월 31일 (목) 13:26, bhavikpatel9977 
<notificati...@github.com>님이 작성:
   > […](#)
   > Thanks. I missed it. Then we could check if some objects are inherited 
from AuthorizingRealm or not, correct? 2019년 10월 31일 (목) 12:20, Prabhjyot 
***@***.***님이 작성: … <#m_-3078128932017298217_> *@*.**** commented on this pull 
request. ------------------------------ In 
zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java 
<#3488 (comment) <[#3488 
(comment)](https://github.com/apache/zeppelin/pull/3488#discussion_r340945687)>>:
 > @@ -298,6 +301,27 @@ public void contextDestroyed(ServletContextEvent 
servletContextEvent) {} } } + private static void validateShiroIni() throws 
Exception { + if (conf.getShiroPath().length() > 0) { + Ini ini = new Ini(); + 
ini.loadFromPath(conf.getShiroPath()); + + Ini.Section usersSection = 
ini.get("users"); + String activeDirectoryRealm = 
ini.getSectionProperty("main", "activeDirectoryRealm"); I see two problems in 
this approach - This is just a name user can choose it to be anything, for 
example activeDirectoryRealm user can choose to write this as just adRealm - 
What happens if in the future community adds a new realm? — You are receiving 
this because you commented. Reply to this email directly, view it on GitHub 
<#3488 
<#3488>?email_source=notifications&email_token=AA3R7FRVETK73QIOI6TAENDQRJFG5A5CNFSM4JAXZVE2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCJ2JLYA#pullrequestreview-309630432>,
 or unsubscribe 
https://github.com/notifications/unsubscribe-auth/AA3R7FS3ZBWKLVEYI57WDF3QRJFG5ANCNFSM4JAXZVEQ
 . We are reading the shiro.ini directly then we will not get an object(realms) 
that we can check against AuthorizingRealm, right? — You are receiving this 
because you commented. Reply to this email directly, view it on GitHub 
<#3488?email_source=notifications&email_token=AA3R7FQXZBTU274MKBFK2GLQRJM5ZA5CNFSM4JAXZVE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECWQYKA#issuecomment-548211752>,
 or unsubscribe 
<https://github.com/notifications/unsubscribe-auth/AA3R7FWNC6MNOB7BCYRFL23QRJM5ZANCNFSM4JAXZVEQ>
 .
   
   We will not get a list of realms classes directly(by reading .ini file); 
also I have checked 
[getRealmsList()](https://github.com/apache/zeppelin/blob/master/zeppelin-server/src/main/java/org/apache/zeppelin/service/ShiroAuthenticationService.java#L133)
 here also we are getting loading the `SecurityManager` class to get realms 
list.
   
   I think we have to follow the earlier implementation approach.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to