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

Document pgp artifact signing keys #3085

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

krmahadevan
Copy link
Member

@krmahadevan krmahadevan commented Mar 7, 2024

Closes #3084

Fixes #3084 .

Did you remember to?

  • Add test case(s)
  • Update CHANGES.txt
  • Auto applied styling via ./gradlew autostyleApply

We encourage pull requests that:

  • Add new features to TestNG (or)
  • Fix bugs in TestNG

If your pull request involves fixing SonarQube issues then we would suggest that you please discuss this with the
TestNG-dev before you spend time working on it.

Note: For more information on contribution guidelines please make sure you refer our Contributing section for detailed set of steps.

Summary by CodeRabbit

  • Documentation
    • Added documentation for the project's PGP artifact signing keys in the CHANGES.txt file.
    • Added instructions for downloading, trusting, and verifying GPG keys in the README.md file.
  • New Features
    • Introduced a new file KEYS containing a PGP public key block for Krishnan Mahadevan, enabling secure communication and verification.
  • Bug Fixes
    • Fixed TestNG 7.x DataProvider behavior to align with TestNG 6.x when retrying tests.
  • Refactor
    • Replaced usages of synchronized with ReentrantLock for improved concurrency control.
    • Provided guidance on dynamically adjusting the number of TestNG threads post-deprecation of IExecutorFactory.

@krmahadevan krmahadevan requested a review from juherr as a code owner March 7, 2024 06:37
Copy link

coderabbitai bot commented Mar 7, 2024

Walkthrough

The recent updates focus on enhancing security measures by documenting PGP artifact signing keys, improving concurrency handling by transitioning from synchronized to ReentrantLock, and refining TestNG configurations for consistency across versions. These changes are pivotal for fortifying the project's reliability and security.

Changes

File(s) Change Summary
CHANGES.txt, KEYS, README.md Added documentation for PGP artifact signing keys and instructions for signature verification using GPG.
Various Replaced synchronized blocks with ReentrantLock for better concurrency control.
TestNG configuration files Aligned TestNG DataProvider behavior with TestNG 6.x for consistent test retrying and adjusted thread management post-deprecation of IExecutorFactory.

Assessment against linked issues

Objective Addressed Explanation
Verify PGP Signature (#3084)
Provide Trusted Signing Keys (#3084)
Documentation Improvement regarding PGP keys (#3084)

Poem

Through code we weave, a tale of keys,
Locks and threads, in harmonious spree.
TestNG dances, in versions past,
With Rabbit's touch, it's built to last. 🐇🔏
Security embraced, with every line,
In the world of code, our project shines.
Progress sings, in leaps profound,
As we safeguard, our code unbound.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 832cff4 and bc31e96.
Files selected for processing (2)
  • CHANGES.txt (1 hunks)
  • KEYS (1 hunks)
Files not reviewed due to errors (1)
  • (no review received)
Additional comments: 1
KEYS (1)
  • 1-37: The PGP public key block addition looks good and aligns with the objectives of enhancing supply chain security by enabling developers to verify the PGP signatures of downloaded artifacts. It's important to ensure that the key's authenticity has been verified and that it's the correct key for Krishnan Mahadevan. Additionally, consider providing guidance on how developers can use this key for verification purposes in the documentation.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 832cff4 and 4ea8ac4.
Files selected for processing (3)
  • CHANGES.txt (1 hunks)
  • KEYS (1 hunks)
  • README.md (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • CHANGES.txt
  • KEYS

README.md Outdated
Comment on lines 57 to 72
### Verifying the signature

1. Download the `.asc` file from `https://repo1.maven.org/maven2/org/testng/testng/<versionGoesHere>`
2. Run the command `gpg --verify testng-7.9.0.jar.asc testng-7.9.0.jar`
3. You should see an output as below:

```bash
gpg: Signature made Tue Dec 26 15:06:16 2023 IST
gpg: using RSA key 0F13D5631D6AF36D
gpg: Good signature from "Krishnan Mahadevan (krmahadevan-key) <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: C4F5 4D86 22C9 5CC3 F098 721A 0F13 D563 1D6A F36D
```

For more details regarding keys please refer [here](https://infra.apache.org/release-signing.html#verifying-signature)
Copy link

@coderabbitai coderabbitai bot Mar 7, 2024

Choose a reason for hiding this comment

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

The instructions for verifying the signature using GPG are clear and straightforward. However, there are a couple of areas that could be improved for clarity and completeness:

  1. Version Placeholder Clarification: In line 59, <versionGoesHere> is used as a placeholder for the version number. It might be helpful to explicitly mention that users should replace this placeholder with the specific version of TestNG they are verifying.

  2. Generalization of Command: The command in line 60 is specific to version 7.9.0. It would be beneficial to generalize this command to match the version placeholder mentioned earlier, such as gpg --verify testng-<versionGoesHere>.jar.asc testng-<versionGoesHere>.jar.

  3. Trust Level of the Key: The warning in lines 67-68 about the key not being certified with a trusted signature is important. It might be useful to add a brief explanation or recommendation on how users can proceed if they encounter this warning. For example, guiding them to verify the key's fingerprint against a trusted source or how to establish trust in the key.

  4. External Link Accessibility: The link provided in line 72 directs users to more details regarding key verification. It's good practice to ensure that this link is accessible and provides relevant and up-to-date information. If the link is subject to change, consider hosting the relevant information directly within the project's documentation to maintain control over its availability and accuracy.

Consider making these improvements to enhance the clarity and usefulness of the signature verification instructions.

Copy link
Member

Choose a reason for hiding this comment

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

Some good advices.

Copy link

Choose a reason for hiding this comment

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

@juherr: Thank you for considering the suggestions! If you have any questions or need further assistance while implementing these improvements, feel free to ask. Your efforts to enhance the project's documentation are greatly appreciated.

Copy link
Member Author

Choose a reason for hiding this comment

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

@juherr - I have addressed these observations. Can you please help check ?

Copy link

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 832cff4 and 115a48e.
Files selected for processing (3)
  • CHANGES.txt (1 hunks)
  • KEYS (1 hunks)
  • README.md (1 hunks)
Files skipped from review as they are similar to previous changes (3)
  • CHANGES.txt
  • KEYS
  • README.md

@krmahadevan krmahadevan merged commit 438674c into testng-team:master Mar 7, 2024
6 of 9 checks passed
@krmahadevan krmahadevan deleted the fix_3084 branch March 7, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please document project's PGP artifact signing keys
2 participants