Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-11128

Elytron - when security Providers are not configured correctly in AuthenticationConfiguration, remoting connection hangs during SASL authentication

XMLWordPrintable

    • Hide
      AuthenticationConfiguration authnCfg = AuthenticationConfiguration.EMPTY.allowSaslMechanisms(mechanismName)
              .useProviders(() -> new Provider[] { null })
              .useName(username).usePassword(password);
      AuthenticationContext.empty().with(MatchRule.ALL, authnCfg).run(() -> {
          try {
              ModelControllerClient client = ModelControllerClient.Factory
                      .create(new ModelControllerClientConfiguration.Builder().setHostName(Utils.getDefaultHost(false))
                              .setPort(portNr).setProtocol("remote")
                              .setConnectionTimeout(600 * 1000).build());
      
              ModelNode operation = new ModelNode();
              operation.get("operation").set("whoami");
              client.execute(operation);
          } catch (IOException e) {
              e.printStackTrace();
          }
      });
      
      Show
      AuthenticationConfiguration authnCfg = AuthenticationConfiguration.EMPTY.allowSaslMechanisms(mechanismName) .useProviders(() -> new Provider[] { null }) .useName(username).usePassword(password); AuthenticationContext.empty().with(MatchRule.ALL, authnCfg).run(() -> { try { ModelControllerClient client = ModelControllerClient.Factory .create( new ModelControllerClientConfiguration.Builder().setHostName(Utils.getDefaultHost( false )) .setPort(portNr).setProtocol( "remote" ) .setConnectionTimeout(600 * 1000).build()); ModelNode operation = new ModelNode(); operation.get( "operation" ).set( "whoami" ); client.execute(operation); } catch (IOException e) { e.printStackTrace(); } });

      When AuthenticationConfiguration contains wrongly configured security Providers (null used), the management remoting connection hangs during SASL authentication.

      AuthenticationConfiguration.useProviders(() -> new Provider[] { null })
      

      Expected behavior:
      Execution should fail immediately.

            dlloyd@redhat.com David Lloyd
            josef.cacek@gmail.com Josef Cacek (Inactive)
            Josef Cacek Josef Cacek (Inactive)
            Josef Cacek Josef Cacek (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: