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

[XSDLookUp] Updated entity resolver to not fallback to network lookup when xsd is not found #135

Closed
sync-by-unito bot opened this issue Mar 2, 2022 · 6 comments
Assignees
Labels
community documentation Improvements or additions to documentation

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Mar 2, 2022

https://github.com/liquibase/liquibase/pull/2558

┆Issue is synchronized with this Jira Story by Unito

@sync-by-unito sync-by-unito bot added community documentation Improvements or additions to documentation labels Mar 2, 2022
@sync-by-unito
Copy link
Author

sync-by-unito bot commented Mar 7, 2022

➤ karen.a.taggart commented:

question from Adrian Velonis

Hi Karen, can you clarify what docs needs to do for this ticket "[XSDLookUp] Updated entity resolver to not fallback to network lookup when xsd is not found"?
https://datical.atlassian.net/browse/PD-2497 ( https://datical.atlassian.net/browse/PD-2497|smart-link )
Do I just have to update the header of our XML changelogs to this?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Mar 7, 2022

➤ karen.a.taggart commented:

Nathan Voxland can you take a look at this and help out Adrian Velonis ? I have to admit I am not following how the PR changed the end user experience and how that should be reflected in the user docs.

Feel free of course to just submit a docs PR with your draft. If you do that, please just let me know and I will close this ticket.

Thanks!

KT

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Mar 7, 2022

➤ Nathan Voxland commented:

We don’t have to change any of our headers or anything.

What changed is that if a user is referencing an XSD other than one of ours, Liquibase will no longer automatically download the XSD from the internet and use it.

Instead, they will get an error of Unable to resolve xml entity locally: liquibase.secureParsing is set to 'true' which does not allow remote lookups. Set it to 'false' to allow remote lookups of xsd files.

Their options are either:

  1. Set liquibase.secureParsing=false however they want (properties file, CLI argument, env variable, etc.)
  2. Add it to a jar in Liquibase’s classpath under the path /.
    1. For example, if the XSD’s path is https://example.com/internal/changelog.xsd it should be stored in a jar in the path /example.com/internal/changelog.xsd

So normal Liquibase usage isn’t impacted. It’s only people who are using custom or extension XSDs which aren’t already included in their local jars.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Mar 7, 2022

➤ Erzsebet Carmean commented:

Nataliya Melnyk, hello -

This change prevents Liquibase from looking on the internet for a missing XSD files referenced in a changelog. This is useful when there is no internet connection from the database or if there is an outage on the Liquibase site hosting the XSDs. This change is also more secure, as it leverages the FEATURE_SECURE_PROCESSING setting in the XML parser to limit the ability to “look anywhere” for files. This XML parser parameter is configured in Liquibase using the Liquibase SECURE_PROCESSING global parameter. The default for for SECURE_PROCESSING is true, which stops Liquibase from looking on the internet for missing XSDs. The SECURE_PROCESSING can be disabled using any of the normal Liquibase configuration options.

Global Parameter : --secure-parsing=PARAM
See liquibase --help for details on how use JAVA_OPTS, liquibase.properties file or environment variables to change the setting of liquibase.secure-parsing.

This comment in the PR has my test notes:
liquibase/liquibase#2558 (comment) ( https://github.com/liquibase/liquibase/pull/2558#issuecomment-1055596870|smart-link )

CC karen.a.taggart

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Mar 7, 2022

➤ karen.a.taggart commented:

Adrian Velonis see below from Erzsebet Carmean and Nathan Voxland Thanks!

@sync-by-unito sync-by-unito bot closed this as completed Mar 9, 2022
@sync-by-unito
Copy link
Author

sync-by-unito bot commented Mar 9, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant