Re: RFR: 8273101: Eliminate the usage of threadgroup sandboxing in the java.util.logging

2021-10-28 Thread Sergey Bylokhov
On Wed, 1 Sep 2021 06:31:16 GMT, Sergey Bylokhov wrote: > At the time Java supported applets and webstart, a special mechanism for > launching various applications in one JVM was used to reduce memory usage and > each application was isolated from each other. > > This isolation was implemented

Integrated: 8257722: Improve "keytool -printcert -jarfile" output

2021-10-28 Thread Hai-May Chao
On Tue, 26 Oct 2021 22:37:02 GMT, Hai-May Chao wrote: > This change does a few improvements to the output of `keytool -printcert > -jarfile` command to help readability and diagnosis. This pull request has now been integrated. Changeset: de93b1d0 Author:Hai-May Chao URL: https://gi

Re: RFR: 8257722: Improve "keytool -printcert -jarfile" output [v5]

2021-10-28 Thread Hai-May Chao
> This change does a few improvements to the output of `keytool -printcert > -jarfile` command to help readability and diagnosis. Hai-May Chao has updated the pull request incrementally with one additional commit since the last revision: Used LinkedHashSet - Changes: - all: ht

Re: RFR: 8257722: Improve "keytool -printcert -jarfile" output [v4]

2021-10-28 Thread Hai-May Chao
On Thu, 28 Oct 2021 21:13:40 GMT, Hai-May Chao wrote: >> This change does a few improvements to the output of `keytool -printcert >> -jarfile` command to help readability and diagnosis. > > Hai-May Chao has updated the pull request incrementally with one additional > commit since the last revis

Re: RFR: 8257722: Improve "keytool -printcert -jarfile" output [v4]

2021-10-28 Thread Weijun Wang
On Thu, 28 Oct 2021 21:13:40 GMT, Hai-May Chao wrote: >> This change does a few improvements to the output of `keytool -printcert >> -jarfile` command to help readability and diagnosis. > > Hai-May Chao has updated the pull request incrementally with one additional > commit since the last revis

Re: RFR: 8257722: Improve "keytool -printcert -jarfile" output [v4]

2021-10-28 Thread Hai-May Chao
> This change does a few improvements to the output of `keytool -printcert > -jarfile` command to help readability and diagnosis. Hai-May Chao has updated the pull request incrementally with one additional commit since the last revision: Update while block code - Changes: - al

Re: RFR: 8257722: Improve "keytool -printcert -jarfile" output [v3]

2021-10-28 Thread Hai-May Chao
On Thu, 28 Oct 2021 17:34:46 GMT, Weijun Wang wrote: >> Hai-May Chao has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update output per review comment > > src/java.base/share/classes/sun/security/tools/keytool/Main.java line 2895: > >> 2

Re: RFR: 8267108: Alternate Subject.getSubject and doAs APIs that do not depend on Security Manager APIs [v4]

2021-10-28 Thread Weijun Wang
On Thu, 28 Oct 2021 17:21:42 GMT, Weijun Wang wrote: >> New `Subject` APIs `current()` and `callAs()` are created to be replacements >> of `getSubject()` and `doAs()` since the latter two methods are now >> deprecated for removal. >> >> In this implementation, by default, `current()` returns t

Re: RFR: 8273026: Slow LoginContext.login() on multi threading application [v7]

2021-10-28 Thread Weijun Wang
On Thu, 28 Oct 2021 18:55:32 GMT, Larry-N wrote: >> This fix adds a cache of service provider classes to LoginContext (in >> particular, it's a cache of LoginModules classes). The approach helps to >> increase the performance of the LoginContext.login() method significantly, >> especially in a

previously prevented exploit now possible with JDK 18

2021-10-28 Thread Rick Hillegas
As a canary in the mineshaft, I built and tested Apache Derby with the recent build 18-ea+20-1248 of Open JDK 18. I tripped across the following issue when running Derby's regression tests. The problem is explained in more detail at https://issues.apache.org/jira/browse/DERBY-7126, where a simp

Re: RFR: 8273026: Slow LoginContext.login() on multi threading application [v6]

2021-10-28 Thread Larry-N
On Thu, 28 Oct 2021 17:45:44 GMT, Larry-N wrote: >> This fix adds a cache of service provider classes to LoginContext (in >> particular, it's a cache of LoginModules classes). The approach helps to >> increase the performance of the LoginContext.login() method significantly, >> especially in a

Re: RFR: 8273026: Slow LoginContext.login() on multi threading application [v7]

2021-10-28 Thread Larry-N
> This fix adds a cache of service provider classes to LoginContext (in > particular, it's a cache of LoginModules classes). The approach helps to > increase the performance of the LoginContext.login() method significantly, > especially in a multi-threading environment. Service Loader is used fo

Post-JEP411 request: callAs(Supplier) Re: RFR: 8267108: Alternate Subject.getSubject and doAs APIs that do not depend on Security Manager APIs [v4]

2021-10-28 Thread Chapman Flack
On 10/28/21 13:25, Weijun Wang wrote: >>> New `Subject` APIs `current()` and `callAs()` are created ... >>> where the `callAs()` method stores the subject into a `ThreadLocal` >>> object and the `current()` method returns it That approach is simple and sweet. There is a case it doesn't cover, whe

Re: RFR: 8273026: Slow LoginContext.login() on multi threading application [v5]

2021-10-28 Thread Weijun Wang
On Wed, 27 Oct 2021 20:08:34 GMT, Larry-N wrote: >> This fix adds a cache of service provider classes to LoginContext (in >> particular, it's a cache of LoginModules classes). The approach helps to >> increase the performance of the LoginContext.login() method significantly, >> especially in a

Re: RFR: 8273026: Slow LoginContext.login() on multi threading application [v5]

2021-10-28 Thread Weijun Wang
On Thu, 28 Oct 2021 17:31:26 GMT, Larry-N wrote: > Thank you for the explanations. When I cleaned up the working directory all > pass ok. ( And fails when I submitted the test a second time) Let's hope the directory is always clean when the test is actually launched. I have no other comments.

Re: RFR: 8273026: Slow LoginContext.login() on multi threading application [v6]

2021-10-28 Thread Weijun Wang
On Thu, 28 Oct 2021 17:42:28 GMT, Larry-N wrote: >> This fix adds a cache of service provider classes to LoginContext (in >> particular, it's a cache of LoginModules classes). The approach helps to >> increase the performance of the LoginContext.login() method significantly, >> especially in a

Re: RFR: 8273026: Slow LoginContext.login() on multi threading application [v6]

2021-10-28 Thread Larry-N
> This fix adds a cache of service provider classes to LoginContext (in > particular, it's a cache of LoginModules classes). The approach helps to > increase the performance of the LoginContext.login() method significantly, > especially in a multi-threading environment. Service Loader is used fo

Re: RFR: 8257722: Improve "keytool -printcert -jarfile" output [v3]

2021-10-28 Thread Weijun Wang
On Thu, 28 Oct 2021 16:17:44 GMT, Hai-May Chao wrote: >> This change does a few improvements to the output of `keytool -printcert >> -jarfile` command to help readability and diagnosis. > > Hai-May Chao has updated the pull request incrementally with one additional > commit since the last revis

Re: RFR: 8273026: Slow LoginContext.login() on multi threading application [v5]

2021-10-28 Thread Larry-N
On Wed, 27 Oct 2021 20:08:34 GMT, Larry-N wrote: >> This fix adds a cache of service provider classes to LoginContext (in >> particular, it's a cache of LoginModules classes). The approach helps to >> increase the performance of the LoginContext.login() method significantly, >> especially in a

Re: RFR: 8267108: Alternate Subject.getSubject and doAs APIs that do not depend on Security Manager APIs [v4]

2021-10-28 Thread Weijun Wang
On Thu, 28 Oct 2021 17:21:42 GMT, Weijun Wang wrote: >> New `Subject` APIs `current()` and `callAs()` are created to be replacements >> of `getSubject()` and `doAs()` since the latter two methods are now >> deprecated for removal. >> >> In this implementation, by default, `current()` returns t

Re: RFR: 8267108: Alternate Subject.getSubject and doAs APIs that do not depend on Security Manager APIs [v4]

2021-10-28 Thread Weijun Wang
> New `Subject` APIs `current()` and `callAs()` are created to be replacements > of `getSubject()` and `doAs()` since the latter two methods are now > deprecated for removal. > > In this implementation, by default, `current()` returns the same value as > `getSubject(AccessController.getCurrent(

Re: RFR: 8225181: KeyStore should have a getAttributes method [v2]

2021-10-28 Thread Weijun Wang
On Thu, 28 Oct 2021 13:51:01 GMT, Sean Mullan wrote: >> I wonder if someone will interpret this as "after I've called `getEntry` on >> a private key, I can get the encrypted attributes through >> `KeyStore::getAttributes`". How about something like "and only available >> through the {@link Key

Re: RFR: 8225181: KeyStore should have a getAttributes method [v2]

2021-10-28 Thread Weijun Wang
> Add `KeyStore::getAttributes` so that one can get the attributes of an entry > without retrieving the entry first. This is especially useful for a private > key entry which can only be retrieved with a password. Weijun Wang has updated the pull request incrementally with one additional commit

Re: RFR: 8257722: Improve "keytool -printcert -jarfile" output [v3]

2021-10-28 Thread Hai-May Chao
On Tue, 26 Oct 2021 23:23:35 GMT, Weijun Wang wrote: >> Hai-May Chao has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update output per review comment > > src/java.base/share/classes/sun/security/tools/keytool/Main.java line 2878: > >> 2

Re: RFR: 8257722: Improve "keytool -printcert -jarfile" output [v3]

2021-10-28 Thread Hai-May Chao
> This change does a few improvements to the output of `keytool -printcert > -jarfile` command to help readability and diagnosis. Hai-May Chao has updated the pull request incrementally with one additional commit since the last revision: Update output per review comment - Change

Re: RFR: 8273026: Slow LoginContext.login() on multi threading application [v5]

2021-10-28 Thread Weijun Wang
On Wed, 27 Oct 2021 20:08:34 GMT, Larry-N wrote: >> This fix adds a cache of service provider classes to LoginContext (in >> particular, it's a cache of LoginModules classes). The approach helps to >> increase the performance of the LoginContext.login() method significantly, >> especially in a

Re: RFR: 8273026: Slow LoginContext.login() on multi threading application [v5]

2021-10-28 Thread Larry-N
On Wed, 27 Oct 2021 20:08:34 GMT, Larry-N wrote: >> This fix adds a cache of service provider classes to LoginContext (in >> particular, it's a cache of LoginModules classes). The approach helps to >> increase the performance of the LoginContext.login() method significantly, >> especially in a

Re: RFR: 8225181: KeyStore should have a getAttributes method

2021-10-28 Thread Sean Mullan
On Wed, 27 Oct 2021 20:10:57 GMT, Weijun Wang wrote: >> Yes, a sentence like that would help. Some suggested tweaks: "For a >> PrivateKeyEntry or SecretKeyEntry, some attributes may be protected and not >> available unless the entry is first extracted by the getEntry() method." >> >> I don't t

Re: RFR: 8267108: Alternate Subject.getSubject and doAs APIs that do not depend on Security Manager APIs [v3]

2021-10-28 Thread Sean Mullan
On Wed, 27 Oct 2021 14:52:47 GMT, Weijun Wang wrote: >> New `Subject` APIs `current()` and `callAs()` are created to be replacements >> of `getSubject()` and `doAs()` since the latter two methods are now >> deprecated for removal. >> >> In this implementation, by default, `current()` returns t

Re: RFR: 8267108: Alternate Subject.getSubject and doAs APIs that do not depend on Security Manager APIs [v3]

2021-10-28 Thread Sean Mullan
On Mon, 25 Oct 2021 19:55:44 GMT, Bernd wrote: >> I just don't want to touch existing spec. Even for `doAs`, I only said >> "callAs is based on doAs by default" and didn't went out explaining what is >> NOT by default. Is that OK? > > Yes good reason not to change it. Suggest using similar wor