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

Add support for allow methods from logbackCompiler.groovy #11

Open
csaltos opened this issue Nov 4, 2023 · 2 comments
Open

Add support for allow methods from logbackCompiler.groovy #11

csaltos opened this issue Nov 4, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@csaltos
Copy link

csaltos commented Nov 4, 2023

Good morning Tucker !!

Thank you very much for logback-groovy-config, it goves oxygen to old Logback based projects using Groovy to upgrade.

I'm trying to activate our logback.groovy file configuration and we have tons of method calls, actually that's why we use logback.groovy instead of logback.xml for configuring our applications but, as you know, the new security based on SecureASTCustomizer does not allow method calls by default.

Some overriding can be done for imports and a couple of other pieces by nothing else, may the option to add a methodDefinitionAllowed at the logbackCompiler.groovy could be reasonable.

All this paranoia is coming from the Log4J drama and I think all this effort to keep Logback based on Groovy configuration secure is a great idea.

Please let me know your thought about it and if it's reasonable to open method calls overrides for users at their own risk, of course.

Best regards,

Carlos Saltos

@csaltos csaltos added the bug Something isn't working label Nov 4, 2023
@virtualdogbert
Copy link
Owner

Sorry, I haven't gotten back to you. I would have to think through potential implications, before opening up methodDefinitionAllowed and I don't think I'm going to have a lot of time to do that in the near future. What I would be worried about are any potential conflicts with the ScriptExpressionChecker, which is not user configurable, for security reasons of what Groovy can do with String and Object.

If you have a more immediate need, you may want to fork this library and build your own version for now.

@csaltos
Copy link
Author

csaltos commented Nov 29, 2023

Thank you for your answer !!

Yes, I agree with you, a change to the `methodDefinitionAllowed would open security risks unnecessarily ... let's hope some day we can find an secure way to do this with Groovy ... in the meantime we create a workaround just using normal static code in our configuration.

Once again thank you very much for your project and your code, it's really cool and useful.

Best regards,

Carlos Saltos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants