{"id":28395126,"url":"https://github.com/databiosphere/terra-billing-profile-manager","last_synced_at":"2025-06-27T01:31:26.294Z","repository":{"id":39164771,"uuid":"454101126","full_name":"DataBiosphere/terra-billing-profile-manager","owner":"DataBiosphere","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-01T13:26:05.000Z","size":1222,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-06-01T06:52:19.432Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DataBiosphere.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-31T17:22:48.000Z","updated_at":"2025-05-01T13:26:09.000Z","dependencies_parsed_at":"2024-02-20T16:41:04.974Z","dependency_job_id":"3099d084-90a8-483a-9f24-71ffb7fcaf6d","html_url":"https://github.com/DataBiosphere/terra-billing-profile-manager","commit_stats":null,"previous_names":[],"tags_count":569,"template":false,"template_full_name":null,"purl":"pkg:github/DataBiosphere/terra-billing-profile-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataBiosphere%2Fterra-billing-profile-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataBiosphere%2Fterra-billing-profile-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataBiosphere%2Fterra-billing-profile-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataBiosphere%2Fterra-billing-profile-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DataBiosphere","download_url":"https://codeload.github.com/DataBiosphere/terra-billing-profile-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataBiosphere%2Fterra-billing-profile-manager/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262172405,"owners_count":23270001,"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":[],"created_at":"2025-05-31T19:39:12.422Z","updated_at":"2025-06-27T01:31:26.287Z","avatar_url":"https://github.com/DataBiosphere.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terra Billing Profile Manager\n\n[![Build and Test](https://github.com/DataBiosphere/terra-billing-profile-manager/actions/workflows/build-and-test.yml/badge.svg?branch=main)](https://github.com/DataBiosphere/terra-billing-profile-manager/actions/workflows/build-and-test.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=DataBiosphere_terra-billing-profile-manager\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=DataBiosphere_terra-billing-profile-manager)\n\nTerra Billing Profile Manager provides an API to set up and control access to billing\nwithin Terra across cloud platforms.\n\n## Building the code\n\n\u003e If you are a new member of the Broad, follow the [getting started guide](docs/getting-started.md)\nfirst.\n\nEnsure you have Java 17 and that it is the default. To check this while in the\n`terra-billing-profile-manager` directory, type `java --version`.\n\nThen, to build the code, run:\n\n```sh\n./gradlew build\n```\n\nTroubleshooting:\n* If you run into an error about `minney-kinney`, execute:\n\n```sh\n./minnie-kenny.sh --force   \n```\n* The build also runs the tests, so the tests will fail unless `postgres` is running (see next step).\n\n## Running the tests\n\nFor tests, ensure you have a local Postgres instance running. While in the\n`terra-billing-profile-manager` directory, initialize the database:\n\n```sh\n./service/local-dev/run_postgres.sh start\n```\n\nAfter the database is initialized, run unit tests:\n```sh\n./gradlew test\n```\n\nTo set up service account credentials and other configuration for running locally:\n* Install yq `brew install yq`\n* Run `render_configs.sh`\n\nTo run integration tests:\n```sh\n./gradlew bootRun \u0026    # start up a local instance of the billing profile manager service\nsleep 5                # wait until service comes up\n./gradlew :integration:runTest --args=\"suites/FullIntegration.json /tmp/test\"\n```\n\n### To run smoke tests\nSee `smoke_tests/README.md`\n\n## Running Billing Profile Manager Locally\n\n```sh\n./gradlew :service:bootRun\n```\n\nThen navigate to the Swagger: http://localhost:8080/swagger-ui.html\n\n## Linter\nAutomatically fix linting issues:\n```sh\n./gradlew spotlessApply\n```\n\n## Generate Java classes from Swagger documentation (.yml file definition)\n\n```sh\n./gradlew generateSwaggerCode\n```\n\n\n## SourceClear\n\n[SourceClear](https://srcclr.github.io) is a static analysis tool that scans a project's Java\ndependencies for known vulnerabilities. If you are working on addressing dependency vulnerabilities\nin response to a SourceClear finding, you may want to run a scan off of a feature branch and/or local code.\n\n### Github Action\n\nYou can trigger BPM's SCA scan on demand via its\n[Github Action](https://github.com/broadinstitute/dsp-appsec-sourceclear-github-actions/actions/workflows/z-manual-terra-billing-profile-manager.yml),\nand optionally specify a Github ref (branch, tag, or SHA) to check out from the repo to scan.  By default,\nthe scan is run off of BPM's `main` branch.\n\nHigh-level results are outputted in the Github Actions run.\n\n### Running Locally\n\nYou will need to get the API token from Vault before running the Gradle `srcclr` task.\n\n```sh\nexport SRCCLR_API_TOKEN=$(vault read -field=api_token secret/secops/ci/srcclr/gradle-agent)\n./gradlew srcclr\n```\n\nHigh-level results are outputted to the terminal.\n\n### Veracode\n\nFull results including dependency graphs are uploaded to\n[Veracode](https://sca.analysiscenter.veracode.com/workspaces/jppForw/projects/551485/issues)\n(if running off of a feature branch, navigate to Project Details \u003e Selected Branch \u003e Change to select your feature branch).\nYou can request a Veracode account to view full results from #dsp-infosec-champions.\n\n\n## Tech Stack\nBPM adheres to the [Terra Tech Stack](https://docs.google.com/document/d/1JkTrtaci7EI0TnuR-68zYgTx_mRCNu-u2eV9XhexWTI/edit#heading=h.5z6knaqygr4a). See linked document for relevant technology choices and the rationale behind their inclusion in this service. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabiosphere%2Fterra-billing-profile-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatabiosphere%2Fterra-billing-profile-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabiosphere%2Fterra-billing-profile-manager/lists"}