Uploaded image for project: 'WildFly Elytron'
  1. WildFly Elytron
  2. ELY-1200

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 1.1.0.Beta48
    • None
    • SASL
    • None
    • 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)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: