-
Notifications
You must be signed in to change notification settings - Fork 4
Rewrite Maven site documentation on Sentry skin 8.0.00 (#113) #125
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
Merged
bertysentry
merged 2 commits into
main
from
113-write-proper-maven-site-documentation-on-the-latest-sentry-maven-skin-8000
Jul 24, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| keywords: authentication, ntlm, kerberos, spnego, domain, realm, kdc, krb5, ticket cache | ||
| description: Authenticate to WinRM with NTLM or Kerberos (SPNEGO), including domain accounts and Kerberos configuration. | ||
|
|
||
| # Authentication | ||
|
|
||
| <!-- MACRO{toc|fromDepth=2|toDepth=3|id=toc} --> | ||
|
|
||
| The client authenticates with either **NTLM** or **Kerberos (SPNEGO)**. The scheme is chosen by the | ||
| `authentications` argument, a | ||
| `List<`[`AuthenticationEnum`](apidocs/org/metricshub/winrm/service/client/auth/AuthenticationEnum.html)`>` | ||
| that both `executeWql(...)` and `WinRMCommandExecutor.execute(...)` accept. | ||
|
|
||
| ```java | ||
| import static org.metricshub.winrm.service.client.auth.AuthenticationEnum.KERBEROS; | ||
| import static org.metricshub.winrm.service.client.auth.AuthenticationEnum.NTLM; | ||
|
|
||
| singletonList(NTLM); // NTLM only (also the default when null or empty) | ||
| singletonList(KERBEROS); // Kerberos only | ||
| ``` | ||
|
|
||
| If the list is `null` or empty, **NTLM** is used. | ||
|
|
||
| ## User name and domain | ||
|
|
||
| The user name may be given as `DOMAIN\user` or as a bare `user`. When a backslash is present, the | ||
| part before it is treated as the Windows domain and the part after it as the account name. In Java, | ||
| remember to escape the backslash in a string literal: | ||
|
|
||
| ```java | ||
| "DOMAIN\\Administrator" // domain = DOMAIN, user = Administrator | ||
| "Administrator" // no domain | ||
| ``` | ||
|
|
||
| ## NTLM | ||
|
|
||
| NTLM is the default. It works over both transports: | ||
|
|
||
| * **HTTP** — the WinRM payload is protected with **NTLM message encryption**, so credentials and | ||
| data are not sent in the clear even without TLS. | ||
| * **HTTPS** — NTLM runs inside the TLS tunnel. See [TLS / HTTPS](tls.html). | ||
|
|
||
| NTLM needs no extra configuration beyond the user name and password. | ||
|
|
||
| ## Kerberos (SPNEGO) | ||
|
|
||
| Kerberos authentication uses SPNEGO through the JDK's GSS-API and **requires HTTPS**. | ||
|
|
||
| ```java | ||
| import static org.metricshub.winrm.WinRMHttpProtocolEnum.HTTPS; | ||
| import static org.metricshub.winrm.service.client.auth.AuthenticationEnum.KERBEROS; | ||
|
|
||
| executeWql( | ||
| HTTPS, "server.example.com", null, | ||
| "DOMAIN\\Administrator", password, null, | ||
| "SELECT Name FROM Win32_ComputerSystem", | ||
| 30_000L, | ||
| ticketCache, // optional java.nio.file.Path to a ticket cache | ||
| singletonList(KERBEROS) | ||
| ); | ||
| ``` | ||
|
|
||
| ### Kerberos configuration | ||
|
|
||
| By default, Kerberos relies on the **ambient JDK Kerberos configuration** — the platform `krb5.conf` | ||
| (or the file named by `-Djava.security.krb5.conf`), or the realm and KDC given directly with | ||
| `-Djava.security.krb5.realm` and `-Djava.security.krb5.kdc`: | ||
|
|
||
| ```bash | ||
| java -Djava.security.krb5.realm=EXAMPLE.COM \ | ||
| -Djava.security.krb5.kdc=dc01.example.com \ | ||
| -cp ... MyApp | ||
| ``` | ||
|
|
||
| The optional `ticketCache` parameter points to a Kerberos ticket cache to use for the connection. | ||
|
|
||
| ## Choosing the scheme on the command line | ||
|
|
||
| The standalone jar selects the scheme with `--ntlm` (the default) or `--kerberos`. The two are | ||
| mutually exclusive, and `--kerberos` requires `--https`: | ||
|
|
||
| ```bash | ||
| java -jar ${project.artifactId}-${project.version}-standalone.jar \ | ||
| -h server.example.com -u 'DOMAIN\user' -pf password.txt \ | ||
| --https --kerberos \ | ||
| command whoami | ||
| ``` | ||
|
|
||
| Instead of relying on the ambient configuration, the CLI can set the JDK Kerberos configuration for | ||
| the current invocation: | ||
|
|
||
| | Option | Meaning | | ||
| | --- | --- | | ||
| | `--kerberos-kdc <host>` | Sets the KDC and, unless `--kerberos-realm` is given, infers the realm from the KDC's DNS suffix. | | ||
| | `--kerberos-realm <realm>` | Overrides the inferred realm. Requires `--kerberos-kdc`. | | ||
|
|
||
| ```bash | ||
| java -jar ${project.artifactId}-${project.version}-standalone.jar \ | ||
| -h server.internal.example.com -u 'DOMAIN\user' -pf password.txt \ | ||
| --https --kerberos --kerberos-kdc dc01.internal.example.com \ | ||
| command whoami | ||
| ``` | ||
|
|
||
| Here the realm is inferred as `INTERNAL.EXAMPLE.COM` by dropping the KDC's first DNS label and | ||
| upper-casing the rest. This follows a common Active Directory naming convention but is not | ||
| guaranteed by Kerberos — pass `--kerberos-realm` when the realm does not match the KDC's DNS suffix, | ||
| or when the KDC is not a fully qualified DNS name. | ||
|
|
||
| ## See also | ||
|
|
||
| * [TLS / HTTPS](tls.html) — required for Kerberos and recommended for NTLM | ||
| * [Timeouts and Errors](timeouts-and-errors.html) — how authentication failures surface | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All seven newly added Markdown pages start directly with metadata and omit the required license header. Add the project header to each new file, using
mvn license:update-file-headeras prescribed, so the repository's license checks and file policy are satisfied.AGENTS.md reference: AGENTS.md:L7-L7
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not making this change. The
license-maven-plugin(inherited from theoss-parentPOM) is configured to process onlymain/java/**/*.java, somvn verify'scheck-file-headerpasses andmvn license:update-file-headerdoes not touch Markdown. The pre-existingindex.mdand the sibling Jawk site follow the same no-header convention: a header would have to sit above the Doxia metadata block (keywords:/description:), which must be the first content of the file, and would break it. Happy to revisit if you'd prefer a dedicated header policy for site pages.🤖 Addressed by Claude Code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow-up: I verified this empirically. Prepending an Apache-2.0 license header (as an HTML comment) above the front-matter and rebuilding the site breaks the page — Doxia only recognizes
keywords:/description:as metadata when they are the very first content, so with a header prepended the page's<meta>tags disappear and the license text plus the rawkeywords:/description:lines render as visible body text. Combined with thelicense-maven-pluginbeing scoped tomain/java/**/*.java(it doesn't process Markdown, andmvn verifyis green) and the sibling Jawk site following the same no-header convention, I'm keeping these site pages header-free. Happy to reconsider if you'd like a different policy (e.g. a footer comment).🤖 Addressed by Claude Code