{"id":22868535,"url":"https://github.com/delineaxpm/tss-sdk-java","last_synced_at":"2025-05-05T19:53:07.316Z","repository":{"id":53263675,"uuid":"495536722","full_name":"DelineaXPM/tss-sdk-java","owner":"DelineaXPM","description":"A Java SDK for Delinea Secret Server","archived":false,"fork":false,"pushed_at":"2024-04-08T03:18:24.000Z","size":135,"stargazers_count":3,"open_issues_count":4,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-08T04:27:23.494Z","etag":null,"topics":["delinea","java","secretserver","thycotic"],"latest_commit_sha":null,"homepage":"https://delinea.com/products/secret-server","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DelineaXPM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-05-23T18:55:43.000Z","updated_at":"2024-04-08T04:27:24.481Z","dependencies_parsed_at":"2024-02-12T02:31:29.481Z","dependency_job_id":"9e2c40b4-3525-4f73-b3ec-fff8cac9ede1","html_url":"https://github.com/DelineaXPM/tss-sdk-java","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DelineaXPM%2Ftss-sdk-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DelineaXPM%2Ftss-sdk-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DelineaXPM%2Ftss-sdk-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DelineaXPM%2Ftss-sdk-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DelineaXPM","download_url":"https://codeload.github.com/DelineaXPM/tss-sdk-java/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252566794,"owners_count":21769109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["delinea","java","secretserver","thycotic"],"created_at":"2024-12-13T12:35:54.316Z","updated_at":"2025-05-05T19:53:07.288Z","avatar_url":"https://github.com/DelineaXPM.png","language":"Java","readme":"# The Delinea Secret Server Java SDK\n\n![Deploy](https://github.com/DelineaXPM/tss-sdk-java/workflows/Deploy/badge.svg)\n\nThe [Delinea](https://delinea.com/) Secret Server Java SDK contains classes that\ninteract with [Secret Server](https://delinea.com/products/secret-server/) via the REST API.\n\nThe SDK contains an API based the [Spring Framework](https://spring.io/projects/spring-framework)\n[RestTemplate](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/client/RestTemplate.html),\nand a simple application based on [Spring Boot](https://spring.io/projects/spring-boot),\nthat calls the API.\n\n## Install into your application\n\nYou can use this SDk in your application by adding the following dependency:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.delinea.secrets\u003c/groupId\u003e\n  \u003cartifactId\u003etss-sdk-java\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Build locally\n\n### Prerequisites\n\nThe SDK builds and runs on Java 8 or later.\n\nApache [Maven](https://maven.apache.org/) is also required to build the SDK.\n\nMaven runs unit and integration tests during the build so the settings in\n`src/main/resources/application.properties` must be configured before the build\nwill succeed.\n\n### Settings\n\nThe API authenticates to Secret Server as an _Application User_.\nThe SDK application gets a secret from Secret Server by it's _id_.\n\nEither `secret_server.tenant` or both `secret_server.api_root_url` and `secret_server.oauth2.token_url` must be set.\n`secret_server.tenant` simplifies the configuration when accessing Secret Server Cloud by using template URLs that\nassume the default folder structure and parameterize the tenant.\n\n```ini\nsecret_server.tenant = mytenant\n# or\n# secret_server.api_root_url = https://mysecretserver/SecretServer/api/v1\n# secret_server.oauth2.token_url = https://mysecretserver/SecretServer/oauth2/token\nsecret_server.oauth2.username = app_user\nsecret_server.oauth2.password = app_user_password\n```\n\nWhen the `tenant` is set, the API assumes a the top-level domain (TLD) of _com_\nbut it can be overridden:\n\n```ini\nsecret_server.tld = com\n```\n\n## Run the jar\n\nAfter the SDK application settings are configured the jar can be built:\n\n```bash\nmvn package\n```\n\nHowever, the build runs the SDK application which requires a `secret.id`\nproperty:\n\n```ini\nsecret.id = 1\n```\n\nThe build also produces an executable jar capable of accepting properties via\nthe command-line. For example:\n\n```bash\njava -jar target/tss-sdk-java-1.0-SNAPSHOT-exec.jar --secret.id=1\n```\n\n## Use the API\n\nConfigure the `SecretServerFactoryBean` in the Spring\n[ApplicationContext](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/ApplicationContext.html)\nthen inject `SecretServer` where required.\n\nThis simple example assumes that the `SecretServerFactoryBean` was configured\nexternally thus allowing a `SecretServer` instance to be injected automatically.\n\n```java\n@Autowired\nprivate SecretServer secretServer;\n\npublic static void main(final String[] args) {\n    final Secret secret = secretServer.getSecret(1);\n\n    secret.getItems().forEach(item -\u003e {\n        if (item.getFieldName().equals(\"password\")) {\n            System.out.println(String.format(\"The password is %s\", item.getValue()));\n        }\n    });\n}\n```\n\nThis one creates an [AnnotationConfigApplicationContext](https://docs.spring.io/spring-framework/docs/current/javadoc-api/index.html?org/springframework/context/ApplicationContext.html) then configures\nthe `SecretServerFactoryBean` from an in-place properties map then registers it\nand finally uses it to get a `SecretServer` instance to fetch the `Secret`.\nIt could be used to adapt the API to a non-Spring Java application or to integrate\nwith an application environment that provides a configuration store.\n\n```java\nfinal AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();\n\n// create a new Spring ApplicationContext using a Map as the PropertySource\nproperties.put(\"example.property\", computedValue());\n// ...\n\napplicationContext.getEnvironment().getPropertySources()\n        .addLast(new MapPropertySource(\"properties\", properties));\n\n// Register the factoryBean\napplicationContext.registerBean(SecretServerFactoryBean.class);\napplicationContext.refresh();\n\n// Fetch the secret\nfinal Secret secret = applicationContext.getBean(SecretServer.class).getSecret(serverSecret.getId());\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelineaxpm%2Ftss-sdk-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelineaxpm%2Ftss-sdk-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelineaxpm%2Ftss-sdk-java/lists"}