IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Wildfly/JBoss Java Discussion :

Jboss 4.2.3: Authentification Impossible


Sujet :

Wildfly/JBoss Java

  1. #1
    Nouveau membre du Club
    Inscrit en
    Août 2007
    Messages
    30
    Détails du profil
    Informations forums :
    Inscription : Août 2007
    Messages : 30
    Points : 27
    Points
    27
    Par défaut Jboss 4.2.3: Authentification Impossible
    Bonjour,
    Je cherche à accéder au JBoss Web Console de mon serveur Jboss 4.2.3 que je l'utilise sous la plate-forme Linux Ubuntu 8.04, une fenêtre m'invite à s'authentifier pour pouvoir accéder à cette rubrique. Sachant que je n'ai rien touché au fichiers de configuration avant d'affronter ce problème, il m'est impossible de se loger en utilisant admin comme login et mot de passe comme c'est indiqué dans la documentation de Jboss.

    J'ai essayer deux pistes pour remédier à ce problème mais sans aucun succès :

    1) Désactiver l'authentification en modifiant le fichier login-config.xml:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    <?xml version='1.0'?>
    <!DOCTYPE policy PUBLIC
          "-//JBoss//DTD JBOSS Security Config 3.0//EN"
          "http://www.jboss.org/j2ee/dtd/security_config.dtd">
     
    <!-- The XML based JAAS login configuration read by the
    org.jboss.security.auth.login.XMLLoginConfig mbean. Add
    an application-policy element for each security domain.
     
    The outline of the application-policy is:
    <application-policy name="security-domain-name">
      <authentication>
        <login-module code="login.module1.class.name" flag="control_flag">
          <module-option name = "option1-name">option1-value</module-option>
          <module-option name = "option2-name">option2-value</module-option>
          ...
        </login-module>
     
        <login-module code="login.module2.class.name" flag="control_flag">
          ...
        </login-module>
        ...
      </authentication>
    </application-policy>
     
    $Revision: 64598 $
    -->
     
    <policy>
        <!-- Used by clients within the application server VM such as
        mbeans and servlets that access EJBs.
        -->
        <application-policy name = "client-login">
           <authentication>
              <login-module code = "org.jboss.security.ClientLoginModule"
                 flag = "required">
                 <!-- Any existing security context will be restored on logout -->
                 <module-option name="restore-login-identity">true</module-option>
              </login-module>
           </authentication>
        </application-policy>
     
        <!-- Security domain for JBossMQ -->
        <application-policy name = "jbossmq">
           <authentication>
              <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
                 flag = "required">
                 <module-option name = "unauthenticatedIdentity">guest</module-option>
                 <module-option name = "dsJndiName">java:/DefaultDS</module-option>
                 <module-option name = "principalsQuery">SELECT PASSWD FROM JMS_USERS WHERE USERID=?</module-option>
                 <module-option name = "rolesQuery">SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=?</module-option>
              </login-module>
           </authentication>
        </application-policy>
     
        <!-- Security domain for JBossMQ when using file-state-service.xml
        <application-policy name = "jbossmq">
           <authentication>
              <login-module code = "org.jboss.mq.sm.file.DynamicLoginModule"
                 flag = "required">
                 <module-option name = "unauthenticatedIdentity">guest</module-option>
                 <module-option name = "sm.objectname">jboss.mq:service=StateManager</module-option>
              </login-module>
           </authentication>
        </application-policy>
        -->
     
        <!-- Security domains for testing new jca framework -->
        <application-policy name = "HsqlDbRealm">
           <authentication>
              <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
                 flag = "required">
                 <module-option name = "principal">sa</module-option>
                 <module-option name = "userName">sa</module-option>
                 <module-option name = "password"></module-option>
                 <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
              </login-module>
           </authentication>
        </application-policy>
     
        <application-policy name = "JmsXARealm">
           <authentication>
              <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
                 flag = "required">
                 <module-option name = "principal">guest</module-option>
                 <module-option name = "userName">guest</module-option>
                 <module-option name = "password">guest</module-option>
                 <module-option name = "managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>
              </login-module>
           </authentication>
        </application-policy>
     
        <!-- A template configuration for the jmx-console web application. This
          defaults to the UsersRolesLoginModule the same as other and should be
          changed to a stronger authentication mechanism as required.
        -->
        <application-policy name = "jmx-console">
           <authentication>
              <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
                 flag = "required">
               <module-option name="usersProperties">props/jmx-console-users.properties</module-option>
               <module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>
              </login-module>
           </authentication>
        </application-policy>
     
        <!-- A template configuration for the web-console web application. This
          defaults to the UsersRolesLoginModule the same as other and should be
          changed to a stronger authentication mechanism as required.
        -->
        <application-policy name = "web-console">
           <authentication>
              <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
                 flag = "required">
                 <module-option name="usersProperties">web-console-users.properties</module-option>
                 <module-option name="rolesProperties">web-console-roles.properties</module-option>
              </login-module>
           </authentication>
        </application-policy>
     
        <!--
          A template configuration for the JBossWS security domain.
          This defaults to the UsersRolesLoginModule the same as other and should be
          changed to a stronger authentication mechanism as required.
        -->
        <application-policy name="JBossWS">
          <authentication>
            <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
              flag="required">
              <module-option name="usersProperties">props/jbossws-users.properties</module-option>
              <module-option name="rolesProperties">props/jbossws-roles.properties</module-option>
              <module-option name="unauthenticatedIdentity">anonymous</module-option>
            </login-module>
          </authentication>
        </application-policy>
     
        <!-- The default login configuration used by any security domain that
        does not have a application-policy entry with a matching name
        -->
        <application-policy name = "other">
           <!-- A simple server login module, which can be used when the number
           of users is relatively small. It uses two properties files:
           users.properties, which holds users (key) and their password (value).
           roles.properties, which holds users (key) and a comma-separated list of
           their roles (value).
           The unauthenticatedIdentity property defines the name of the principal
           that will be used when a null username and password are presented as is
           the case for an unuathenticated web client or MDB. If you want to
           allow such users to be authenticated add the property, e.g.,
           unauthenticatedIdentity="nobody"
           -->
           <authentication>
              <login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
                 flag = "required" />
           </authentication>
        </application-policy>
     
    </policy>
    2) Ajouter un nouvel utilisateur (rhani-sama) ayant accès aux resources Jboss:

    jbossws-users.properties
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    # A sample users.properties file for use with the UsersRolesLoginModule
    admin=admin
    rhani-sama=aaaa
    jbossws-users.properties
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    # A sample users.properties file for use with the UsersRolesLoginModule
    kermit=thefrog
    rhani-sama=aaaa
    A vrai dire, je souhaite garder l'authentification (rejet de la 1ere piste). Je cherche d'ailleurs à utiliser une BD pour gérer les utilisateurs et les privilèges d'accès.

    Merci pour votre aide.
    Images attachées Images attachées  

  2. #2
    Membre éclairé Avatar de XmasRock
    Inscrit en
    Janvier 2007
    Messages
    729
    Détails du profil
    Informations forums :
    Inscription : Janvier 2007
    Messages : 729
    Points : 821
    Points
    821
    Par défaut
    avec une 4.2.3, l'authentification est désactivée chez moi.
    Le fichier [...]default/deploy/jbossws.sar/jbossws-context.war/WEB-INF/web.xml contient :
    <!-- A security constraint that restricts access
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>ContextServlet</web-resource-name>
    <description>An example security config that only allows users with the
    role 'friend' to access the JBossWS console web application
    </description>
    <url-pattern>/*</url-pattern>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>friend</role-name>
    </auth-constraint>
    </security-constraint>
    -->
    (note que tout est en commentaire)

    et default/deploy/jbossws.sar/jbossws-context.war/WEB-INF/jboss-web.xml

    <!-- A security domain that restricts access
    <security-domain>java:/jaas/JBossWS</security-domain>
    -->
    As-tu ça aussi ?

  3. #3
    Nouveau membre du Club
    Inscrit en
    Août 2007
    Messages
    30
    Détails du profil
    Informations forums :
    Inscription : Août 2007
    Messages : 30
    Points : 27
    Points
    27
    Par défaut
    Citation Envoyé par XmasRock Voir le message
    As-tu ça aussi ?
    Je te remerci XmasRock pour ta réponse:

    Et voici le contenu des fichiers que tu as demandé:

    default/deploy/jbossws.sar/jbossws-context.war/WEB-INF/web.xml
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    <?xml version="1.0" encoding="ISO-8859-1"?>
     
    <!--
      A web application that installs the JBossWS servlets
     
      $Id: web.xml 4016 2007-07-27 06:00:11Z thomas.diesler@jboss.com $
    -->
     
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
     
      <display-name>JBossWS</display-name>
     
      <servlet>
        <servlet-name>ContextServlet</servlet-name>
        <servlet-class>org.jboss.wsf.framework.management.ContextServlet</servlet-class>
      </servlet>
     
      <servlet>
        <servlet-name>PortComponentLinkServlet</servlet-name>
        <servlet-class>org.jboss.ws.core.server.PortComponentLinkServlet</servlet-class>
      </servlet>
     
      <!-- now the mappings -->
     
      <servlet-mapping>
        <servlet-name>ContextServlet</servlet-name>
        <url-pattern>/services/*</url-pattern>
      </servlet-mapping>
     
      <servlet-mapping>
        <servlet-name>PortComponentLinkServlet</servlet-name>
        <url-pattern>/pclink</url-pattern>
      </servlet-mapping>
     
       <!-- A security constraint that restricts access
       <security-constraint>
         <web-resource-collection>
           <web-resource-name>ContextServlet</web-resource-name>
           <description>An example security config that only allows users with the
             role 'friend' to access the JBossWS console web application
           </description>
           <url-pattern>/*</url-pattern>
           <http-method>GET</http-method>
           <http-method>POST</http-method>
         </web-resource-collection>
         <auth-constraint>
           <role-name>friend</role-name>
         </auth-constraint>
       </security-constraint>
       -->
     
       <login-config>
          <auth-method>BASIC</auth-method>
          <realm-name>JBossWS Management Console</realm-name>
       </login-config>
     
       <security-role>
          <role-name>friend</role-name>
       </security-role>
      
      <!-- 
      currently the W3C haven't settled on a media type for WSDL;
      http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
      for now we go with the basic 'it's XML' response 
      -->
      <mime-mapping>
        <extension>wsdl</extension>
        <mime-type>text/xml</mime-type>
      </mime-mapping>
     
      <mime-mapping>
        <extension>xsd</extension>
        <mime-type>text/xml</mime-type>
      </mime-mapping>
     
      <welcome-file-list id="WelcomeFileList">
        <welcome-file>index.html</welcome-file>
      </welcome-file-list>
     
    </web-app>
    default/deploy/jbossws.sar/jbossws-context.war/WEB-INF/jboss-web.xml
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    <?xml version="1.0" encoding="ISO-8859-1"?>
     
    <!DOCTYPE jboss-web
        PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
        "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
     
    <jboss-web>
     
      <!-- A security domain that restricts access
      <security-domain>java:/jaas/JBossWS</security-domain>
      -->
     
      <context-root>jbossws</context-root>
     
    </jboss-web>

  4. #4
    Membre actif
    Inscrit en
    Août 2005
    Messages
    96
    Détails du profil
    Informations forums :
    Inscription : Août 2005
    Messages : 96
    Points : 205
    Points
    205
    Par défaut Identification JBoss AS Administration Console
    Pour accéder à la console d'administration : http://localhost:8080/admin-console

    Il faut ouvrir ce fichier et modifier la paire admin=mdp

    jboss-5.1.0.GA\server\default\conf\props\jmx-console-users.properties


Discussions similaires

  1. Authentification impossible Wordpress/Phpmyadmin
    Par sulliwane dans le forum Apache
    Réponses: 3
    Dernier message: 26/07/2010, 11h14
  2. [Exchange 2010] Authentification impossible avec OWA
    Par DomiM dans le forum Exchange Server
    Réponses: 10
    Dernier message: 08/03/2010, 10h37
  3. CUPS : Authentification impossible
    Par libuma dans le forum Réseau
    Réponses: 4
    Dernier message: 18/12/2008, 23h44
  4. Réponses: 1
    Dernier message: 24/11/2008, 11h29
  5. Réponses: 0
    Dernier message: 03/04/2008, 12h35

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo