<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    gembin

    OSGi, Eclipse Equinox, ECF, Virgo, Gemini, Apache Felix, Karaf, Aires, Camel, Eclipse RCP

    HBase, Hadoop, ZooKeeper, Cassandra

    Flex4, AS3, Swiz framework, GraniteDS, BlazeDS etc.

    There is nothing that software can't fix. Unfortunately, there is also nothing that software can't completely fuck up. That gap is called talent.

    About Me

     

    Common Problems with Authentication Provider Configuration

    I haunt the BEA security forum and often see people struggling with common authenticator configuration issues. One of two things usually happens:

    • The server won’t boot
    • A user can’t authenticate or authorize

    I’ll show you how to fix these problems after a brief explanation of what authenticators do. This will give you context for understanding the solutions and handling future troubleshooting sessions.

    What Authenticators Do

    Authenticators are responsible for authenticating users as part of the WebLogic security framework. I know you want to throw your monitor at me for making such an obvious statement. Even my cat smacked me when I wrote it. However, what’s not so obvious is that authenticators have a supporting role in the authorization process.

    Authenticators deal with principals. In WebLogic, principals are users and groups. Thus, an authenticator can tell the security framework that a user successfully authenticated or not but it can also say to which groups a user belongs. It does this by creating a Subject object and populating it with the username and group names for which the user is a member. This information is used by the role mapping providers which in turn feed the authorization providers. The authorization providers make a decision based on the security policy of the requested resource and the information provided by the other security providers. This is how an authenticator can cause authorization problems. We’ll see more on that in a bit.

    Out of the box, users are stored in WebLogic’s embedded LDAP. This means all “normal” users as well as the WebLogic administrative user typically named “weblogic” or “admin” are stored there. Additionally, groups are also stored in embedded LDAP. Users and groups are stored there because the embedded LDAP serves as the DefaultAuthenticator’s data store. Remove the DefaultAuthenticator and the users and groups in embedded LDAP will not be used. Or, you could add another authenticator which would have its own user/group storage. Now, the users and groups known to WebLogic encompass both data stores.

    There’s one more critical piece about authenticators and that’s the Control Flag. Each authenticator has a Control Flag that can be set to REQUIRED, REQUISITE, SUFFICIENT, or OPTIONAL. Each flag indicates how the authenticator will be treated by the security framework and whether or not that authenticator has to be able to successfully authenticate the user or not. You can find an explanation of these flagshere.

    With the authenticator explanations out of the way, let’s move on to the problems and their solutions.

    Getting the Server to Start

    Starting WebLogic requires authorization. The boot identity (the main WebLogic administrative user) is used to do it. Just like any other protected resource, authentication and authorization is delegated to the security framework. With the normal security configuration, the DefaultAuthenticator will find the boot user, authenticate it, populate the Subject with the groups, and start-up will continue assuming the authorizers are pleased.

    You must have at least one authenticator in a security realm. One of those authenticators must be able to find and authenticate the boot user. If not, the server won’t start and you’ll get the following error message:

    Authentication denied: Boot identity not valid

    When this happens, check the following:

    1. That the boot identity (normally “weblogic”) is stored in a data store managed by an active authenticator
    2. That the boot identity is in the “Admin” group
    3. Authenticator order matters — check the control flags of all active authenticators. Forgetting to change the DefaultAuthenticator to OPTIONAL or SUFFICIENT in multiple authenticator configurations is the leading cause of authentication issues
    4. That boot.properties contains the correct username/password (or you’re typing in the correct username/password when you’re not using boot.properties)

    Essentially, getting the server to start requires that a user be authenticated and authorized. This sounds an awful lot like…

    Authenticating Users for an Application

    That’s right. The same principles apply to “normal” authentication and authorization in J2EE applications. A common problem is trying to login to a web application only to get the login page again. As mentioned above, you don’t really know if the failure to access the page is from an incorrect username/password or the simple fact that the user (while properly authenticated) is not authorized for access.

    Check the following when you can’t log in to your application:

    1. That the user is located in a data store managed by an active authenticator
    2. That the role mentioned in the security constraint in web.xml maps to a principal (usually a group) in weblogic.xml (For WebLogic 9.x, you can readWebLogic 9.1 Authorization Gotcha for a painful lesson I learned)
    3. Authenticator order matters — check the control flags of all active authenticators. Forgetting to change the DefaultAuthenticator to OPTIONAL or SUFFICIENT in multiple authenticator configurations is the leading cause of authentication issues.

    This checklist is essentially the same as the first list because the two problem areas are actually the same type of problem. Starting the server is just a special case due to the mechanics of specifying the boot identity (such as via boot.properties).

    The tips given above should have you well on your way to solving your authentication/authorization problems.

    Identity Assertion

    If your user authenticates with a perimeter token such as a client certificate, most of the tips above still apply. The difference is that 1) there’s an identity asserter provider for the token type in question; and 2) that token has to be mapped to an existing user in the realm.

    The first difference is fairly obvious. It’s the second one that can cause some problems. Regardless of the token type, somehow its contents must map to a user known to WebLogic. For example, if you configure an identity asserter to handle X.509 certificates, you might indicate that the user name is the email address within the certificate. In that case, your user data store must contain that email address just like the data store must contain the username and password for username/password authentication. By the same token (yes, the pun was definitely intended), the user must be in the appropriate group for authorization purposes, just like in all of the scenarios above.

    For more information on X.509 identity assertion, see Mutual Authentication in Action.

    Multiple Security Realms

    Up until now, I never mentioned a domain with multiple security realms. The reason I didn’t mention it is that there can only be one realm active at a time. Inactive ones are not used at all. Referencing an inactive realm in web.xml has no effect. In fact, the realm name in web.xml is totally arbitrary and regardless of what you specify, the active realm will be used. See WebLogic Security Framework Overview for more information.

    Even so, WebLogic’s functionality in this regard can cause you grief if you configured an authenticator in an inactive realm. The fix, of course, is to either make your new realm the active one or add the extra authenticator to the active realm.

    Summary

    This post described the authentication and authorization process. When troubleshooting authentication and authorization problems, consider the following:

    • Is the username and password correct?
    • Is the security constraint mapped to the role you think it is?
    • Is the role mapped to the proper group?
    • Is the user actually in that group?
    • Is an authenticator properly configured to point to the data store containing the user and group?
    • For multiple authenticators, are the control flags and authenticator order appropriate?
    • If you have multiple security realms, realize that only one is active at a time

    keep it for reference:

    http://monduke.com/2006/08/27/common-problems-with-authentication-provider-configuration/

    posted on 2010-11-17 17:35 gembin 閱讀(698) 評論(0)  編輯  收藏 所屬分類: JavaEE

    導航

    統計

    常用鏈接

    留言簿(6)

    隨筆分類(440)

    隨筆檔案(378)

    文章檔案(6)

    新聞檔案(1)

    相冊

    收藏夾(9)

    Adobe

    Android

    AS3

    Blog-Links

    Build

    Design Pattern

    Eclipse

    Favorite Links

    Flickr

    Game Dev

    HBase

    Identity Management

    IT resources

    JEE

    Language

    OpenID

    OSGi

    SOA

    Version Control

    最新隨筆

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    free counters
    主站蜘蛛池模板: 免费人妻精品一区二区三区| 免费无码中文字幕A级毛片| 亚洲午夜久久久久久久久久| 国产精品白浆在线观看免费| 亚洲一区精彩视频| 中文字幕精品亚洲无线码二区| 久久精品一本到99热免费| 亚洲妇女无套内射精| 亚洲精品午夜国产VA久久成人| 国产福利在线免费| 一级成人生活片免费看| 亚洲日本在线观看网址| 亚洲午夜精品第一区二区8050| 4399影视免费观看高清直播| 亚洲AV无码XXX麻豆艾秋| 亚洲AV日韩AV鸥美在线观看| 成人免费无码大片a毛片| 狠狠躁狠狠爱免费视频无码| 亚洲丰满熟女一区二区v| 在线精品亚洲一区二区小说| 免费人成视频在线| 99久久综合精品免费| 羞羞漫画登录页面免费| 亚洲一区免费在线观看| 亚洲乱码一区二区三区在线观看 | 日韩亚洲精品福利| 五月婷婷在线免费观看| 国产精品美女久久久免费| 中文日韩亚洲欧美制服| 亚洲尹人九九大色香蕉网站| 亚洲熟伦熟女新五十路熟妇 | 亚洲欧洲日韩国产| 亚洲男同帅GAY片在线观看| 国产高清视频在线免费观看| 最近2019免费中文字幕6| 一级一黄在线观看视频免费| 亚洲AV成人无码网天堂| 国产精品亚洲自在线播放页码| 亚洲综合一区二区国产精品| 国产成人综合亚洲亚洲国产第一页| 国产无遮挡色视频免费视频|