{"id":29458510,"url":"https://github.com/softleader/security-guardium-starter","last_synced_at":"2025-07-13T23:37:41.846Z","repository":{"id":300736925,"uuid":"166170037","full_name":"softleader/security-guardium-starter","owner":"softleader","description":"Secure service w/ IBM Security Guardium","archived":false,"fork":false,"pushed_at":"2025-06-23T10:20:23.000Z","size":746,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-23T10:45:34.272Z","etag":null,"topics":["security"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softleader.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-01-17T06:06:35.000Z","updated_at":"2025-06-23T10:17:37.000Z","dependencies_parsed_at":"2025-06-23T10:45:43.111Z","dependency_job_id":"1b470e25-5a67-4b94-a920-dac390375cce","html_url":"https://github.com/softleader/security-guardium-starter","commit_stats":null,"previous_names":["softleader/security-guardium-starter"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/softleader/security-guardium-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softleader%2Fsecurity-guardium-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softleader%2Fsecurity-guardium-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softleader%2Fsecurity-guardium-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softleader%2Fsecurity-guardium-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softleader","download_url":"https://codeload.github.com/softleader/security-guardium-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softleader%2Fsecurity-guardium-starter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265222996,"owners_count":23730327,"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":["security"],"created_at":"2025-07-13T23:37:35.940Z","updated_at":"2025-07-13T23:37:41.836Z","avatar_url":"https://github.com/softleader.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# security-guardium-starter\n\nSecure service w/ IBM Security Guardium\n\n\u003e 如果你的專案使用 [softleader/softleader-boot-starter-platform](https://github.com/softleader/softleader-boot-starter-platform), 請使用 [legacy 版本](https://github.com/softleader/security-guardium-starter/tree/legacy)\n\n## Properteis\n\n- `security.guardium.enabled` - 是否啟用 (default: `true`)\n- `security.guardium.dialect` - Guardium 使用的方言: `AUTO`, `ORACLE`, `DEFAULT` (default: `AUTO`)\n\n\u003e `AUTO` dialect detecting 會在 App 啟動時建立資料庫連線來判斷是否為 `ORACLE`, 否則退回使用 `DEFAULT` 方言 \n\n以下設定適用於純 JDBC (ex: [Spring Data JDBC](https://spring.io/projects/spring-data-jdbc)), 若使用 JPA (ex: [Spring Data JPA](https://spring.io/projects/spring-data-jpa)) 則以下參數將忽略\n\n- `security.guardium.query-timeout-second` - 設定 sql statement timeout 秒數, -1 代表使用 driver 預設值, 但 driver default 有可能會 block main thread 太久, 因此提供參數可以控制, 建議要設定 (default: `10`)\n- `security.guardium.data-source-ref` - 設定 dataSource bean 名稱 (default `dataSource`)\n\n## How to setup\n\n首先我們須在要 `pom.xml` 加入 starter:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003etw.com.softleader.data.jakarta\u003c/groupId\u003e\n  \u003cartifactId\u003esecurity-guardium-starter\u003c/artifactId\u003e\n  \u003cversion\u003elast-release-version\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n此 Starter 預設啟動的 IBM Security Guardium 實作為版本 10, 實作為 [`IBMSecurityGuardium10Api`](src/main/java/tw/com/softleader/data/jakarta/security/guardium/IBMSecurityGuardium10Api.java), 請注意你的環境是否符合[規格](./docs)\n\n[`GuardAppEventSupplier`](src/main/java/tw/com/softleader/data/jakarta/security/guardium/GuardAppEventSupplier.java) 是用來提供每一次要寫入 IBM Security Guardium 時的 runtime 資料, 專案在使用上必須提供實作, 並將之註冊成 Spring Bean, 範例如下:\n\n```java\n@Configuration\nclass MyConfig {\n\n  @Bean\n  GuardAppEventSupplier guardAppEventSupplier() {\n    return (method, args) -\u003e GuardAppEvent.builder()\n      .userName(\"...\") // 對應 Guardium API 的 GuardAppEventUserName, ex: 登入系統之使用者 帳號(ID)\n      .type(\"...\") // 對應 Guardium API 的 GuardAppEventType, ex: 使用者所使用的 應用系統名稱_模組功能名稱\n      .strValue(\"...\") // 對應 Guardium API 的 GuardAppEventStrValue, ex: 使用者 IP 位址\n      .build();\n  }\n}\n```\n\n- `method` - 被 AOP 攔截的 method\n- `args` - 被 AOP 攔截 method 的 input 參數\n\n## How to use\n\n在你希望被加入安全監控的 Spring service class 或 method 上加上 `@Safeguard` 即可:\n\n```java\n@Safeguard\npublic class MyService {\n    \n    // will be safeguard\n    public void hello() {\n      // ...\n    }\n}\n``` \n\n## Logging\n\nset `logging.level.tw.com.softleader.data.security.guardium=trace` to show every sql that `GuardAppEventApi` executed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftleader%2Fsecurity-guardium-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftleader%2Fsecurity-guardium-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftleader%2Fsecurity-guardium-starter/lists"}