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

Remove no longer maintained dependency com.github.mifmif:generex #6052

Closed
stianst opened this issue Jun 14, 2024 · 3 comments · Fixed by #6060
Closed

Remove no longer maintained dependency com.github.mifmif:generex #6052

stianst opened this issue Jun 14, 2024 · 3 comments · Fixed by #6060
Assignees
Milestone

Comments

@stianst
Copy link

stianst commented Jun 14, 2024

Is your enhancement related to a problem? Please describe

Auditing health and licenses for dependencies of Keycloak Operator this dependency was detected. The last release of the dependency was 2016-10-30, and can be considered abandoned by its maintainers as there has not been any activity. There's even a rather old open issue asking if the project is still alive, but no response in nearly 5 years.

generex also has a transitive dependency on automaton that is more than 10 years old, with an open request to update.

Describe the solution you'd like

Remove the use of the dependency that is no longer actively maintained.

Describe alternatives you've considered

No response

Additional context

No response

@manusa manusa added this to the 7.0.0 milestone Jun 14, 2024
@stianst stianst changed the title Removed no longer maintained dependency com.github.mifmif:generex Remove no longer maintained dependency com.github.mifmif:generex Jun 14, 2024
@andreaTP andreaTP mentioned this issue Jun 14, 2024
11 tasks
@manusa
Copy link
Member

manusa commented Jun 17, 2024

See #6053 (comment)

This is not going to generate a valid template instance

Why is this?

  • generating a random string can easily lead to errors
  • the random string cannot be tracked

The purpose of this method is really to process locally the templates as if they were being processed by the OpenShift cluster.

It really doesn't matter if the string can't be tracked or if the random string is invalid (maybe because the provided expression is wrong).
In the end, this would be the user's responsibility.

parameters:
- description: Password used for Redis authentication
  from: '[A-Z0-9]{8}'
  generate: expression
  name: REDIS_PASSWORD

https://docs.openshift.com/container-platform/4.15/openshift_images/using-templates.html#templates-writing_using-templates

What we want is to be able to support this.

From the docs we can read the constraints for this expression:

generate specifies the generator to be used to generate random string from an input value specified by From field. The result string is stored into Value field. If empty, no generator is being used, leaving the result Value untouched. Optional.

The only supported generator is "expression", which accepts a "from" value in the form of a simple regular expression containing the range expression "[a-zA-Z0-9]", and the length expression "a{length}".

Examples:

from value
"test[0-9]{1}x" "test7x"
"[0-1]{8}" "01001100"
"0x[A-F0-9]{4}" "0xB3AF"
"[a-zA-Z0-9]{8}" "hW4yQU5i"

It seems that a simple library or maybe even rolling our own utility method should suffice to handle this.

@andreaTP
Copy link
Member

Thanks for linking the detailed docs!

rolling our own utility method should suffice to handle this

Looks easy enough, it's a fun distraction I take it 👍

@andreaTP andreaTP self-assigned this Jun 17, 2024
@manusa
Copy link
Member

manusa commented Jun 17, 2024

Looks easy enough, it's a fun distraction I take it 👍

Thanks 🙌 🙌 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants