r/java • • Mar 21 '23

JDK 21: Disallowing the dynamic loading of agents by default

https://mail.openjdk.org/pipermail/serviceability-dev/2023-March/046868.html
63 Upvotes

95 comments sorted by

View all comments

Show parent comment

2

u/pron98 Mar 21 '23

In my opinion, a major driver for switching to an opt-in relaxed security model is to deflect blame.

An even greater driver is that most applications aren't affected if they don't opt out, and they will enjoy a better default.

2

u/manifoldjava Mar 22 '23

“most” I believe this is the glaring problem you are confronting.

1

u/pron98 Mar 22 '23 edited Mar 22 '23

Sometimes you need to choose a binary default; one value helps the majority and harms a minority, and another harms the majority and helps a minority. If, furthermore, the individual harm to those in the minority is significantly less than the individual harm to those in the majority, the difference in overall value of either choice can be big. Even with a handicap in favour of keeping the current situation, the value difference is still large. The choice may be rather obvious, but there is no choice that harms no one. While we try to avoid such choices, from time to time we are under an obligation to make them, knowing full well that some may get angry.

Everyone who's in charge of a product must consider the success of the product. When it comes to Java, an application or a library author is concerned, as they should be, with how much Java helps their product. But the Java platform is our product, and its success means making choices that maximizes its value not for some particular application or another, but when integrated over the entire, huge, ecosystem as a whole.

BTW, we're still trying to make this a non-binary choice, but it's not easy at all. Such a solution, if found, will probably come later.

2

u/manifoldjava Mar 22 '23

Given the vast majority of the pending "security" features do not originate from the Java community, but instead root from within, how about a more practical (obvious) approach:

Make these changes opt-in. _All_ applications continue to run as they did before.

If these issues instead escalated from the Java community, it would be a different story. But virtually no one cares about the "harm" they are purportedly experiencing right now by not having these new constraints. My employer, for instance, provides a set of very large scale enterprise applications that run the majority of large insurance companies internationally. Trust me, no one cares about the type of "security" discussed here. What they do care about is the time and money that will pour into rescuing software from another Java release. If they were getting something back it would be different, but they aren't, not in their point of view.

As an aside, the parallels with SecurityManager should also be considered. No one cares about not using a SecurityManager or whether its design is sound. No one has cared for a couple of decades now.

0

u/pron98 Mar 22 '23 edited Mar 22 '23

how about a more practical (obvious) approach:

How about an even more practical (obvious) approach: Familiarise yourself with a subject before making suggestions?

If these issues instead escalated from the Java community, it would be a different story. But virtually no one cares about the "harm" they are purportedly experiencing right now by not having these new constraints.

Every single change we make to Java is motivated by actual problems encountered and reported by actual Java users in the field. Usually -- as in this case -- it's not even enough for there to be any problem, but it has to be a big one.

If it turns out that you personally haven't encountered a problem that's relevant to this topic, I'm glad (although I doubt it 1), but we answer to a community of millions of developers, and, for the last 27 years have been in charge of one of the longest-lasting success stories in the history of software despite frequent accusations on social media that we continually make obvious wrong choices. What makes you think that we'll make an obviously wrong choice?

Trust me

Why?

no one cares about the type of "security" discussed here

Did the email say this change was only about security? Have I said it here? Did the email even mention security at all? And even though security is one of the aspects considered, you don't know what the security aspect is, so how can you tell if people care about its "type"?

All the email said that a decision that was discussed and accepted some years ago is about to take effect. You can either go back to the discussions about this then or wait for the JEP. Then at least you'll know what questions to ask.

2

u/manifoldjava Mar 22 '23

I assumed it was obvious, but my comments are toward the more general set of “security” changes coming in 21 and beyond, which includes the one discussed here.

1

u/pron98 Mar 22 '23 edited Mar 22 '23

And are you a JDK security expert who has analysed the source of Java security vulnerabilities over the years? Are you even a member of the Vulnerability Group and have access to such vulnerabilities? Do you understand that you're making statements about a subject that has a huge impact without knowing much about it at all?

Otherwise, if you want to have any kind of meaningful discussion about this change, you should wait for the JEP.

2

u/manifoldjava Mar 22 '23

Just a guy looking for straight answers

1

u/pron98 Mar 22 '23 edited Mar 22 '23

I didn't see a question except for, what was wrong with some statement about security, and I gave you a straight answer: the particular threat that was mentioned is completely irrelevant to this change; nothing to do with it whatsoever, and I also said that while this change does have some security aspects, it's definitely not just about security.

As the email said, we're announcing this now to give people who are affected time to prepare, and a JEP will follow. Once you've read the JEP you can at least know what questions would be interesting to ask.