HCL-TECH-SOFTWARE / domino-jnx

Modern Domino Java API based on JNA access to Domino's C API
https://opensource.hcltechsw.com/domino-jnx/
Apache License 2.0
13 stars 3 forks source link

Anonymous DominoClient in RunJavaAddin #427

Closed sbasegmez closed 4 months ago

sbasegmez commented 4 months ago

https://github.com/HCL-TECH-SOFTWARE/domino-jnx/blob/627f3297546daf85d1d0b15ed7a19078bf69ac34/domino-jnx-api/src/main/java/com/hcl/domino/server/RunJavaAddin.java#L69

RunJavaAddin builds the DominoClient as anonymous. I changed the code on my version as follows:

try (DominoClient client = DominoClientBuilder.newDominoClient().asIDUser().withFullAccess().build()) {
...
}

I don't know if there is a better way. Would a password-protected server ID cause a problem? Also, we might require the ability to limit full access in the future.

jesse-gallagher commented 4 months ago

This should be a good addition. I don't think password-protected servers would cause trouble - by the time it gets to this point, the addin process is already being launched from a previously-authenticated server, so it shouldn't need to reauthenticate.

sbasegmez commented 4 months ago

Thanks!