src/main/java/com/purbon/kafka/topology/AccessControlManager.java
/**
   * Build the core list of actions builders for creating access control rules
   *
   * @param topology A topology file
   * @return List<Action> A list of actions required based on the parameters
   */
Build the core list of actions builders for creating access control rules
@param topology A topology file
@return List A list of actions required based on the parameters
Build the core list of actions builders for creating access control rules @param topology A topology file @return List A list of actions required based on the parameters
public List<Action> buildProjectActions(Topology topology) throws IOException {
    List<Action> actions = new ArrayList<>();
    for (Project project : topology.getProjects()) {
      if (config.shouldOptimizeAcls()) {
        actions.addAll(buildOptimizeConsumerAndProducerAcls(project));
      } else {
        actions.addAll(buildDetailedConsumerAndProducerAcls(project));
      }
      String topicPrefix = project.namePrefix();
      for (KStream app : project.getStreams()) {
        syncApplicationAcls(app, topicPrefix).ifPresent(actions::add);
      }
      for (KSqlApp kSqlApp : project.getKSqls()) {
        syncApplicationAcls(kSqlApp, topicPrefix).ifPresent(actions::add);
      }
      for (Connector connector : project.getConnectors()) {
        syncApplicationAcls(connector, topicPrefix).ifPresent(actions::add);
        connector
            .getConnectors()
            .ifPresent(
                (list) -> {
                  actions.add(
                      new BuildBindingsForConnectorAuthorization(bindingsBuilder, connector));
                });
      }
      for (Schemas schemaAuthorization : project.getSchemas()) {
        actions.add(new BuildBindingsForSchemaAuthorization(bindingsBuilder, schemaAuthorization));
      }
      syncRbacRawRoles(project.getRbacRawRoles(), topicPrefix, actions);
      for (Map.Entry<String, List<Other>> other : project.getOthers().entrySet()) {
        if (julieRoles.size() == 0) {
          throw new IOException(
              "Custom JulieRoles are being used without providing the required config file.");
        }
        actions.add(
            new BuildBindingsForRole(
                bindingsBuilder, julieRoles.get(other.getKey()), other.getValue()));
      }
    }
    return actions;
  }
public List < Action > buildProjectActions ( Topology topology ) throws IOException { List < Action > actions = new ArrayList < > ( ) ; for ( Project project : topology . getProjects ( ) ) { if ( config . shouldOptimizeAcls ( ) ) { actions . addAll ( buildOptimizeConsumerAndProducerAcls ( project ) ) ; } else { actions . addAll ( buildDetailedConsumerAndProducerAcls ( project ) ) ; } String topicPrefix = project . namePrefix ( ) ; for ( KStream app : project . getStreams ( ) ) { syncApplicationAcls ( app , topicPrefix ) . ifPresent ( actions :: add ) ; } for ( KSqlApp kSqlApp : project . getKSqls ( ) ) { syncApplicationAcls ( kSqlApp , topicPrefix ) . ifPresent ( actions :: add ) ; } for ( Connector connector : project . getConnectors ( ) ) { syncApplicationAcls ( connector , topicPrefix ) . ifPresent ( actions :: add ) ; connector . getConnectors ( ) . ifPresent ( ( list ) -> { actions . add ( new BuildBindingsForConnectorAuthorization ( bindingsBuilder , connector ) ) ; } ) ; } for ( Schemas schemaAuthorization : project . getSchemas ( ) ) { actions . add ( new BuildBindingsForSchemaAuthorization ( bindingsBuilder , schemaAuthorization ) ) ; } syncRbacRawRoles ( project . getRbacRawRoles ( ) , topicPrefix , actions ) ; for ( Map . Entry < String , List < Other > > other : project . getOthers ( ) . entrySet ( ) ) { if ( julieRoles . size ( ) == 0 ) { throw new IOException ( "Custom JulieRoles are being used without providing the required config file." ) ; } actions . add ( new BuildBindingsForRole ( bindingsBuilder , julieRoles . get ( other . getKey ( ) ) , other . getValue ( ) ) ) ; } } return actions ; }
Build the core list of actions builders for creating access control rules
 @param topology A topology file
 @return List<Action> A list of actions required based on the parameters
Build the core list of actions builders for creating access control rules @param topology A topology file @return List<Action > A list of actions required based on the parameters
// Setup global Kafka Stream Access control lists