Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RHSSO-2238] Modify the escape_sed_rhs_interpolated_characters() routine to to properly handle partially/fully escaped input string #266

Merged
merged 1 commit into from Oct 24, 2022

Conversation

iankko
Copy link
Collaborator

@iankko iankko commented Oct 20, 2022

[RHSSO-2238] Modify the escape_sed_rhs_interpolated_characters()
routine to properly handle the case when its specified input string
is already partially (or fully) escaped

Signed-off-by: Jan Lieskovsky <jlieskov@redhat.com>

Thanks for submitting your Pull Request!

Please make sure your PR meets the following requirements:

  • Pull Request title is properly formatted: [CLOUD-XYA] Subject
  • Pull Request contains link to the JIRA issue
  • Pull Request contains description of the issue
  • Pull Request does not include fixes for issues other than the main ticket
  • Attached commits represent units of work and are properly formatted
  • You have read and agreed to the Developer Certificate of Origin (DCO) (see CONTRIBUTING.md)
  • Every commit contains Signed-off-by: Your Name <yourname@example.com> - use git commit -s

routine to properly handle the case when its specified input string
is already partially (or fully) escaped

Signed-off-by: Jan Lieskovsky <jlieskov@redhat.com>
@iankko iankko added bug rh-sso-7.6.1 Candidate change to be possibly included into RH-SSO 7.6.1 release labels Oct 20, 2022
@iankko iankko self-assigned this Oct 20, 2022
@iankko
Copy link
Collaborator Author

iankko commented Oct 20, 2022

Notes about testing:

Candidate RH-SSO container image containing this change can be found in the container pipeline #617 run.

Steps To Reproduce the Original Issue / Verify the Fix:

Run the image with the ENABLE_ACCESS_LOG env var set to true. On unfixed image it will report error like the following one and fail to boot properly:

Current Result:

$ docker run -e SSO_ADMIN_USERNAME=admin -e SSO_ADMIN_PASSWORD=doesntmatter -e ENABLE_ACCESS_LOG=true registry.redhat.io/rh-sso-7/sso75-openshift-rhel8:7.5-33
...
08:00:13,374 INFO  [org.wildfly.security] (ServerService Thread Pool -- 30) ELY00001: WildFly Elytron version 1.15.13.Final-redhat-00001
08:00:13,965 ERROR [org.jboss.as.controller] (Controller Boot Thread) 

OPVDX001: Validation error in standalone-openshift.xml -------------------------
|
|  628:     <host name="default-host" alias="localhost">
|  629:         <location name="/" handler="sso-welcome-content"/>
|  630:         <access-log use-server-log="true" pattern="%h %l %u %t %{i,X-Forwarded-Host} \<!-- ##ACCESS_LOG_VALVE## -->quot;%r\<!-- ##ACCESS_LOG_VALVE## -->quot; %s %b"/>
|                                                                                             ^^^^ Unexpected character '<' (code 60) in attribute value
|
|  631:         <http-invoker security-realm="ApplicationRealm"/>
|  632:     </host>
|  633: </server>
|
| The primary underlying error message was:
| > Unexpected character '<' (code 60) in attribute value
| >  at [row,col {unknown-source}]: [630,99]
|
|-------------------------------------------------------------------------------

08:00:13,966 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
	at org.jboss.as.controller@15.0.15.Final-redhat-00001//org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:143)
	at org.jboss.as.server@15.0.15.Final-redhat-00001//org.jboss.as.server.ServerService.boot(ServerService.java:408)
	at org.jboss.as.controller@15.0.15.Final-redhat-00001//org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:447)
	at java.base/java.lang.Thread.run(Thread.java:829)

08:00:13,967 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
08:00:13,977 INFO  [org.jboss.as] (MSC service thread 1-2) WFLYSRV0050: WildFly Core 15.0.15.Final-redhat-00001 stopped in 6ms

Expected Result:
While with the corrected image, there will be no error & the image boots properly.

@iankko
Copy link
Collaborator Author

iankko commented Oct 24, 2022

@drichtarik Thx for the prompt review!

@iankko iankko merged commit 53aec0f into jboss-container-images:sso76-dev Oct 24, 2022
@iankko iankko deleted the RHSSO-2238 branch October 24, 2022 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug rh-sso-7.6.1 Candidate change to be possibly included into RH-SSO 7.6.1 release
2 participants