Bug 1183984
| Summary: | Unable to access Workbench Maven repository with Basic Authentication enabled | ||
|---|---|---|---|
| Product: | [Retired] JBoss BPMS Platform 6 | Reporter: | manstis |
| Component: | Business Central | Assignee: | manstis |
| Status: | CLOSED EOL | QA Contact: | Marek Baluch <mbaluch> |
| Severity: | urgent | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.1.0 | ||
| Target Milestone: | ER5 | ||
| Target Release: | 6.1.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-03-27 18:36:21 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Verified on 6.1.0.ER5. The code is passing now. https://gitlab.mw.lab.eng.bos.redhat.com/bxms/brms/commit/8120ae62871b96b6d6616cebd64254043e42b90d |
Description of problem: The Workbench's Maven Repository is a protected resource meaning it needs (Basic Authentication) User credentials supplied in HTTP requests. It is impossible to use Drools Engine's UrlResource to add KJARs from the Workbench's Maven repository due to flawed implementation of Basic Authentication HTTP headers in the UrlResource class. Version-Release number of selected component (if applicable): 6.1.x (Product), 6.2.x (Community) How reproducible: Always Steps to Reproduce: Try to access the Workbench Maven Repository with something like this: KieServices ks = KieServices.Factory.get(); KieRepository kr = ks.getRepository(); UrlResource urlResource = (UrlResource) ks.getResources().newUrlResource("http://business-central/maven2/<path-to-JAR>.jar"); urlResource.setUsername("username"); urlResource.setPassword("password"); urlResource.setBasicAuthentication("enabled"); InputStream is = urlResource.getInputStream(); KieModule kModule = kr.addKieModule( ks.getResources().newInputStreamResource(is) ); Actual results: HTTP401/HTTP403 (see comments) Expected results: HTTP200