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 telemetry for security-related settings #8440

Merged
merged 3 commits into from Aug 31, 2023

Conversation

daniel-beck
Copy link
Member

@daniel-beck daniel-beck commented Aug 28, 2023

What it says in the title.

Help UI rendered:

Screenshot 2023-08-28 at 17 07 41

Testing done

Checked the help text of the usage stats option (see screenshot)

Confirmed that the output of ExtensionList.lookupSingleton(jenkins.telemetry.impl.SecurityConfiguration).createContent() makes sense:

{
    "components": {
        "csp": "1.2",
        "jenkins-core": "2.421-SNAPSHOT",
        "sample-plugin": "1.0-SNAPSHOT (private-c3d7e2df-danielbeck)"
    },
    "authorizationStrategy": "hudson.security.AuthorizationStrategy$Unsecured",
    "securityRealm": "hudson.security.SecurityRealm$None",
    "crumbIssuer": "hudson.security.csrf.DefaultCrumbIssuer",
    "markupFormatter": "hudson.markup.EscapedMarkupFormatter",
    "inboundAgentListener": true,
    "apiTokenCreationOfLegacyTokenEnabled": false,
    "apiTokenTokenGenerationOnCreationEnabled": false,
    "apiTokenUsageStatisticsEnabled": true
}

Proposed changelog entries

  • Add telemetry collecting basic information about the security configuration.

Proposed upgrade guidelines

N/A

Submitter checklist

Desired reviewers

@mention

Before the changes are marked as ready-for-merge:

Maintainer checklist

@NotMyFault NotMyFault added the rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Aug 29, 2023
Copy link
Member

@NotMyFault NotMyFault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but SpotBugs.

@NotMyFault NotMyFault requested a review from a team August 29, 2023 16:58
@daniel-beck daniel-beck self-assigned this Aug 29, 2023
@MarkEWaite
Copy link
Contributor

Agreed with @NotMyFault that the change looks good but the spotbugs warning needs to be resolved or suppressed before this can be merged

@daniel-beck daniel-beck removed their assignment Aug 29, 2023
@MarkEWaite
Copy link
Contributor

This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback.

@MarkEWaite MarkEWaite added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Aug 29, 2023
@NotMyFault NotMyFault merged commit 95373a9 into jenkinsci:master Aug 31, 2023
18 checks passed
@NotMyFault
Copy link
Member

Should this be included in 2.414.2 and .3 too? I'm not too familiar with which versions metrics shall be collected from.

@krisstern
Copy link
Member

Including this in the backporting for LTS 2.414.3

krisstern pushed a commit to krisstern/jenkins that referenced this pull request Oct 2, 2023
* Add telemetry for security-related settings

* Actually include component information

* FindBugs, also TcpSlaveAgentListener can be null

---------

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
(cherry picked from commit 95373a9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted
Projects
None yet
4 participants