From ac3bdfe11977c1d75296fb25e992f5e34b9fa1f2 Mon Sep 17 00:00:00 2001 From: Rohit Kumar Date: Thu, 9 Jul 2026 13:13:58 +0530 Subject: [PATCH 1/2] Update README and add CONTRIBUTING file - Removed API docs link from title - Removed Questions section from README - Added CONTRIBUTING.md file with Issues and Changes sections only - Updated README to reference CONTRIBUTING.md - Kept all other improvements (Vault Enterprise note, updated examples, etc.) --- CONTRIBUTING.md | 11 ++++ README.md | 138 +++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..eefb788 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,11 @@ +# Contributing + +Review the following guidelines for submitting issues or changes to this repository. + +## Issues + +If you encounter an issue with this project, you're welcome to submit a [bug report](https://github.com/IBM/secrets-manager-management-java-sdk/issues) to help us improve. Before you create a new issue, please search for similar issues in case someone has already reported the same problem. + +## Changes + +Thank you for contributing to IBM Cloud SDK projects! To learn more about submitting changes to this repository, check out the [IBM Cloud SDK Common contribution guidelines](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/CONTRIBUTING_java.md). \ No newline at end of file diff --git a/README.md b/README.md index 83f5454..129f865 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,136 @@ -# secrets-manager-management-java-sdk -Java SDK for IBM Cloud Secrets Manager instance management +# IBM Cloud Secrets Manager Management Java SDK +A Java client library to interact with the IBM Cloud® Secrets Manager Instance Management APIs. + +> **Important:** This SDK is for use with instances of the IBM Cloud Secrets Manager **Vault Enterprise plan only**. It is not compatible with other Secrets Manager plans. + +
+Table of Contents + +* [Overview](#overview) +* [Prerequisites](#prerequisites) +* [Installation](#installation) +* [Authentication](#authentication) +* [Using the SDK](#using-the-sdk) +* [Issues](#issues) +* [Contributing](#contributing) +* [License](#license) + +
+ +## Overview +The IBM Cloud Secrets Manager Management Java SDK allows developers to programmatically interact with the following IBM Cloud services: + +| Service name | Imported class name | +|-------------------------------------------|----------------------------------------| +| Secrets Manager Management | SecretsManagerInstanceManagement | + +## Prerequisites + +[ibm-cloud-onboarding]: https://cloud.ibm.com/registration + +- An [IBM Cloud account](https://cloud.ibm.com/registration). +- A [Secrets Manager service instance](https://cloud.ibm.com/catalog/services/secrets-manager) with the **Vault Enterprise plan**. +- An [IBM Cloud API key](https://cloud.ibm.com/iam/apikeys) that allows the SDK to access your account. +- Java 11 + +## Installation +##### Maven + +```xml + + com.ibm.cloud + secrets-manager-instance-management + 2.0.1 + +``` + +##### Gradle + +```gradle +'com.ibm.cloud:secrets-manager-instance-management:2.0.1' +``` + +## Authentication +Secrets Manager uses token-based Identity and Access Management (IAM) authentication. + +With IAM authentication, you supply an API key that is used to generate an access token. Then, the access token is included in each API request to Secrets Manager. Access tokens are valid for a limited amount of time and must be regenerated. +Authentication for this SDK is accomplished by using [IAM authenticators](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/README.md#authentication). Import authenticators from `com.ibm.cloud.sdk.core.security`. + +### Examples + +#### Programmatic credentials + +```java +import com.ibm.cloud.sdk.core.security.IamAuthenticator; +... +IamAuthenticator iamAuthenticator = new IamAuthenticator.Builder() + .apikey("") + .build(); +``` + +To learn more about IAM authenticators and how to use them in your Java application, see +the [IBM Java SDK Core documentation](https://github.com/IBM/java-sdk-core/blob/master/Authentication.md). + +## Using the SDK + +### Basic usage +- Use the `setServiceUrl` method to set the endpoint URL that is specific to your Secrets Manager service instance. To find your endpoint URL, you can copy it from the **Endpoints** section on the **Overview** page in the Secrets Manager UI. + +#### Examples + +Construct a service client and use it to generate an admin token and get instance details. +Here's an example `main.java` class file: + +```java +import com.ibm.cloud.secrets_manager_sdk_instance_management.secrets_manager_instance_management.v2.SecretsManagerInstanceManagement; +import com.ibm.cloud.secrets_manager_sdk_instance_management.secrets_manager_instance_management.v2.model.*; +import com.ibm.cloud.sdk.core.http.Response; +import com.ibm.cloud.sdk.core.security.IamAuthenticator; + +public class main { + + protected static SecretsManagerInstanceManagement smim; + protected static IamAuthenticator iamAuthenticator; + + public static void main(String[] args) { + iamAuthenticator = new IamAuthenticator.Builder() + .apikey("") + .build(); + smim = new SecretsManagerInstanceManagement("Secrets Manager Instance Management", iamAuthenticator); + smim.setServiceUrl(""); + + // Generate admin token + AdminTokenGenerateOptions adminTokenGenerateOptions = new AdminTokenGenerateOptions.Builder() + .instanceCrn("") + .build(); + Response tokenResp = smim.adminTokenGenerate(adminTokenGenerateOptions).execute(); + + System.out.println("Admin token generated!"); + + // Get instance details + InstanceDetailsOptions instanceDetailsOptions = new InstanceDetailsOptions.Builder() + .instanceCrn("") + .build(); + Response instanceResp = smim.instanceDetails(instanceDetailsOptions).execute(); + + System.out.println("Instance details: " + instanceResp.getResult()); + } + +} +``` + +Replace the `IBM_CLOUD_API_KEY`, `SERVICE_URL`, and `INSTANCE_CRN` values. Then run your application. + +For more information and IBM Cloud SDK usage examples for Java, see the [IBM Cloud SDK Common documentation](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/README.md). + +## Issues + +If you encounter an issue with the project, you're welcome to submit a [bug report](https://github.com/IBM/secrets-manager-management-java-sdk/issues) to help us improve. + +## Contributing + +For general contribution guidelines, see [CONTRIBUTING](CONTRIBUTING.md). + +## License + +This SDK project is released under the Apache 2.0 license. The license's full text can be found in [LICENSE](LICENSE). From cd72cb694b4987a1ceb32390d2fa9e5d9ce0bba7 Mon Sep 17 00:00:00 2001 From: Rohit Kumar Date: Mon, 13 Jul 2026 12:07:05 +0530 Subject: [PATCH 2/2] Add release configuration files - Added .releaserc for semantic-release automation - Added .bumpversion.toml for version management - Added CODE_OF_CONDUCT.md for community guidelines - Added .gitattributes for Git line ending configuration --- .bumpversion.toml | 15 +++++++++++ .gitattributes | 1 + .releaserc | 29 ++++++++++++++++++++++ CODE_OF_CONDUCT.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++ pom.xml | 2 +- 5 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 .bumpversion.toml create mode 100644 .gitattributes create mode 100644 .releaserc create mode 100644 CODE_OF_CONDUCT.md diff --git a/.bumpversion.toml b/.bumpversion.toml new file mode 100644 index 0000000..d37b43d --- /dev/null +++ b/.bumpversion.toml @@ -0,0 +1,15 @@ +[tool.bumpversion] +current_version = "2.0.0" +commit = false +tag = false +allow_dirty = true + +[[tool.bumpversion.files]] +filename = "pom.xml" +search = "{current_version}" +replace = "{new_version}" + +[[tool.bumpversion.files]] +filename = "README.md" +search = "{current_version}" +replace = "{new_version}" \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7d2b3cf --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.enc binary diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..df50536 --- /dev/null +++ b/.releaserc @@ -0,0 +1,29 @@ +{ + "debug": true, + "branches": [ "main" ], + "plugins": [ + ["@semantic-release/commit-analyzer", { + "preset": "angular", + "releaseRules": [ + {"type": "release","release": "patch"}, + {"type": "major","release": "major"}, + {"type": "minor","release": "minor"}, + {"type": "patch","release": "patch"} + ]}], + "@semantic-release/release-notes-generator", + [ + "@semantic-release/exec", + { + "prepareCmd": "bump-my-version bump ${nextRelease.type} --allow-dirty --new-version ${nextRelease.version}" + } + ], + [ + "@semantic-release/git", + { + "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}", + "assets": ["pom.xml", "modules/*/pom.xml", "README.md", ".bumpversion.toml"] + } + ], + "@semantic-release/github" + ] +} \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..7c8db7f --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,62 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making +participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, +disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, +socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take +appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, +issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the +project or its community. Examples of representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed representative at an online or offline +event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at +phil_adams@us.ibm.com. All complaints will be reviewed and investigated and will result in a response that is deemed +necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to +the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent +repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available +at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/pom.xml b/pom.xml index b0790f5..957621e 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.ibm.cloud secrets-manager-management-java-sdk - 1.0.0-SNAPSHOT + 2.0.0 jar secrets-manager-management-java-sdk