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

Make it possible to bypass /origin/files policy [RHELDST-22253] #711

Merged
merged 2 commits into from
May 13, 2024

Conversation

rohanpm
Copy link
Member

@rohanpm rohanpm commented May 12, 2024

RHELDST-23443 started to enforce that content published under /origin/files must abide by the established naming scheme (e.g. checksum in path must match checksum of content).

Problem: content from legacy storage is still being migrated via exodus-gw, and some of that content fails to comply. We should permit migration of such content as-is.

As there is a use-case for bypassing these checks, but only for the user performing the migration, add a new role supporting this. If the calling user has e.g. "live-ignore-policy", they will be permitted to bypass this specific check in "live". This will be granted to the user performing the migration.

The relevant code was rewritten a bit and placed next to the other validation code so that it's cleaner to catch/ignore the exception when needed.

- drop one old expired sqlalchemy exception
- add a pip exception for a CVE which is not exploitable for this
  service
RHELDST-23443 started to enforce that content published under
/origin/files must abide by the established naming scheme (e.g. checksum
in path must match checksum of content).

Problem: content from legacy storage is still being migrated via
exodus-gw, and some of that content fails to comply. We should permit
migration of such content as-is.

As there is a use-case for bypassing these checks, but only for the user
performing the migration, add a new role supporting this. If the calling
user has e.g. "live-ignore-policy", they will be permitted to bypass
this specific check in "live". This will be granted to the user
performing the migration.

The relevant code was rewritten a bit and placed next to the other
validation code so that it's cleaner to catch/ignore the exception when
needed.
@rohanpm rohanpm marked this pull request as ready for review May 13, 2024 00:10
@rohanpm rohanpm merged commit 15cf38a into release-engineering:master May 13, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants