Uploaded image for project: 'JBoss BRMS Platform'
  1. JBoss BRMS Platform
  2. RHBRMS-2225

URLResourceManager fails to find url_filter.yaml

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 6.0.1
    • 6.0.0
    • Business Central
    • None

      Description of problem:

      BRMS 6.0.0.GA in EAP 6.1.1.

      Even if you edit $JBOSS_HOME/standalone/deployments/business-central.war/WEB-INF/classes/url_filter.yaml, the change is not picked up. This is because URLResourceManager (its ModuleClassLoader) fails to find url_filter.yaml.

      ====
      64 private Resources loadConfigData() {
      65 final Yaml yaml = new Yaml();
      66 final InputStream stream = URLResourceManager.class.getClassLoader().getResourceAsStream( this.configFile );
      ...
      ====

      Steps to Reproduce:

      1. Configure business-central maven repo in pom.xml and have dependency to a project built by business-central. Clean your local .m2 repo for the dependency jar to make sure it will access to business-central maven repo.

      <repository>
      <id>guvnor-m2-repo</id>
      <name>Guvnor M2 Repo</name>
      <url>http://localhost:8080/business-central/maven2/</url>
      </repository>
      ...
      <dependency>
      <groupId>org.kie.example</groupId>
      <artifactId>project1</artifactId>
      <version>1.0.0</version>
      </dependency>

      Also note that you DON'T have user/password in settings.xml.

      <servers>
      <server>
      <id>guvnor-m2-repo</id>
      <username>admin</username>
      <password>password1!</password>
      </server>
      </servers>

      2. mvn clean install

      3. You should see Unauthorized error.

      Failed to read artifact descriptor for org.kie.example:project1:jar:1.0.0: Could not transfer artifact org.kie.example:project1:pom:1.0.0 from/to guvnor-m2-repo (http://localhost:8080/business-central/maven2/): Not authorized, ReasonPhrase:Unauthorized.

      4. Then edit $JBOSS_HOME/standalone/deployments/business-central.war/WEB-INF/classes/url_filter.yaml to remove the maven security

      ====
      filter:

      • pattern: /rest/**
      • pattern: /org.kie.workbench.drools.KIEDroolsWebapp/**

      exclude:

      • /*.ico
      • /org.kie.workbench.drools.KIEDroolsWebapp/images/**
      • /org.kie.workbench.drools.KIEDroolsWebapp/css/**
      • /css/**
      • /images/**
      • /maven2/**
        ====

      5. Reboot BRMS and run mvn again

      Actual results:

      Still see Unauthorized error.

      Expected results:

      mvn runs successfully

      Additional info:

      This issue didn't exist in BRMS 6.0.0.Beta.

            manstis@redhat.com Michael Anstis
            rhn-support-tkobayas Toshiya Kobayashi
            Archiver:
            rhn-support-ceverson Clark Everson
            Radovan Synek Radovan Synek
            Radovan Synek Radovan Synek
            Kris Verlaenen, Lukáš Petrovický (Inactive), Rajesh Rajasekaran, Toshiya Kobayashi

              Created:
              Updated:
              Resolved:
              Archived: