build(deps): bump flywayVersion from 12.3.0 to 12.4.0
Bumps
flywayVersionfrom 12.3.0 to 12.4.0.Updates
org.flywaydb:flyway-corefrom 12.3.0 to 12.4.0Updates
org.flywaydb:flyway-mysqlfrom 12.3.0 to 12.4.0Updates
org.flywaydb:flyway-database-postgresqlfrom 12.3.0 to 12.4.0
updated-dependencies:
- dependency-name: org.flywaydb:flyway-core dependency-version: 12.4.0 dependency-type: direct:production update-type: version-update:semver-minor
- dependency-name: org.flywaydb:flyway-mysql dependency-version: 12.4.0 dependency-type: direct:production update-type: version-update:semver-minor
- dependency-name: org.flywaydb:flyway-database-postgresql dependency-version: 12.4.0 dependency-type: direct:production update-type: version-update:semver-minor …
Signed-off-by: dependabot[bot] support@github.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
CredHub manages credentials like passwords, certificates, certificate authorities, ssh keys, rsa keys and arbitrary values (strings and JSON blobs). CredHub provides a CLI and API to get, set, generate and securely store such credentials.
CredHub is intended to be deployed by BOSH using the credhub-release BOSH release. This repository is for development and is not intended to be directly deployable.
Additional repos:
Contributing to CredHub
The Cloud Foundry team uses GitHub and accepts contributions via pull request.
Contributor License Agreement
Follow these steps to make a contribution to any of our open source repositories:
Ensure that you have completed our CLA Agreement for individuals or corporations.
Set your name and email (these should match the information on your submitted CLA)
Reporting a Vulnerability
We strongly encourage people to report security vulnerabilities privately to our security team before disclosing them in a public forum.
Please note that the e-mail address below should only be used for reporting undisclosed security vulnerabilities in open source Cloud Foundry codebases and managing the process of fixing such vulnerabilities. We cannot accept regular bug reports or other security-related queries at this address.
The e-mail address to use to contact the CFF Security Team is security@cloudfoundry.org.
Our public PGP key can be obtained from a public key server such as pgp.mit.edu. Its fingerprint is: 3FC8 9AF3 940B E270 CF25 E122 9965 0006 EF9D C642. More information can be found at cloudfoundry.org/security.
General Workflow
git checkout -b <my_new_branch>)git push origin <my_new_branch>) and submit a pull requestWe favor pull requests with very small, single commits with a single purpose. Your pull request is much more likely to be accepted if it is small and focused with a clear message that conveys the intent of your change.
Generating API Documentation
The CredHub API can generate API documentation by running its test suite (via Spring Rest Docs). CredHub API Documentation can be generated as follows:
CredHub API documentation will be built as an html file in the CredHub backend gradle subproject build directory:
backends/credhub/build/docs/asciidoc/index.html.Development Configuration
Launching in production directly using the
bootRuntarget is unsafe, as you will launch with adevprofile, which has checked-in secret keys inapplication-dev.yml.Dependency Graph
A dependency graph of project components (gradle subprojects) can be generated to better understand project organization. You will need graphviz installed on your system in order to generate the graph.
Generally
Configuration for the server is spread across the
application*.ymlfiles.application.yml.application-dev.yml. This includes:dev-keys intended for development use only.application-dev-h2.yml,application-dev-mysql.yml, andapplication-dev-postgres.yml. For convenience, these per-database profiles include thedevprofile.By default, CredHub launches with the
dev-h2anddevprofiles enabled.UAA and the JWT public signing key
CredHub requires a UAA server to manage authentication.
In
application-dev.ymlthere are two relevant settings:auth-server.url. This needs to point to a running UAA server (remote or BOSH-lite, it’s up to you).security.oauth2.resource.jwt.key-value. This is the public verification key, corresponding to a private JWT signing key held by your UAA server.For convenience, the CredHub team runs a public UAA whose IP is in the default
application-dev.ymlmanifest. The password grant values arecredhub/passwordand the client credentials grant value arecredhub_client/secret. This public UAA is for local development usage only! You will need to skip SSL validation in order to use it.Running CredHub with local UAA
In order to run CredHub against a UAA running on your local machine, do the following:
docker run -d --mount type=bind,source=$PWD/config/uaa.yml,target=/uaa/uaa.yml -p 127.0.0.1:8080:8080 pcfseceng/uaa:latest. (May need to add the config/uaa.yml path to the Docker virtual file shares in Settings-Resources-FileSharing.) Alternatively, you can use local UAA dev build instead by adding items fromcredhub/config/uaa.ymltouaa/uaa/src/main/resources/uaa.ymlbefore starting the UAA server../scripts/start_server.sh -Dspring.profiles.active=dev,dev-h2,dev-local-uaaFor testing purposes, the local UAA bootstraps a user (username:
credhub/ password:password) and a client (client ID:credhub_client/ client secret:secret), with which you can access the local CredHub. For example:Starting the server with different databases
H2 (the default)
H2 datasource configuration is in
application-dev-h2.yml.PostgreSQL
Postgres datasource configuration is in
application-dev-postgres.yml.Before development, you’ll need to create the target database.
A local Postgres server with docker can be started as follows:
Then to run in development mode with Postgres
MySQL
MySQL datasource configuration is in
application-dev-mysql.yml.Log into your MySQL server and create databases
credhub_devandcredhub_testwith privileges granted toroot.If you’re on a Mac using Homebrew and you run into a problem where you install MySQL and it isn’t running (i.e.,
mysql -u rooterrors with a socket error), you may need to uninstall mysql, delete the/usr/local/var/mysqldirectory (Warning: this will delete all local MySQL data!), and then reinstall MySQL.Alternatively, you can also start a local MySQL server with docker:
Then to run in development mode with MySQL:
Debugging the server
To load JDWP agent for credhub jvm debugging, start the server as follows:
You can then attach your debugger to port 5005 of the jvm process.
To suspend the server start-up until the debugger is attached (useful for debugging start-up code), start the server as follows:
Running tests with different databases
Testing with different databases requires you to set a system property with the profile corresponding to your desired database. For example, to test with H2, you’ll need to run the tests with the
-Dspring.profiles.active=unit-test-h2profile.During development, it is helpful to set up different IntelliJ testing profiles that use the following VM Options:
-ea -Dspring.profiles.active=unit-test-h2for testing with H2-ea -Dspring.profiles.active=unit-test-mysqlfor testing with MySQL-ea -Dspring.profiles.active=unit-test-postgresfor testing with PostgresTesting with the CLI and Acceptance Tests
Using the CLI locally
After having pulled the credhub-cli repo, run
make, and then run the following command to target your locally running CredHub instance:Running the Acceptance Tests
First, be sure to pull and compile the credhub-cli, as described above.
Make sure your development server is running. When it starts up for the first time, it will create a server CA and server certificate for SSL, as well as a trusted client CA for testing mutual TLS authentication. These will be located in
src/test/resourcesrelative to thecredhubrepository.Pull credhub-acceptance-tests and run:
Assuming it works, that will generate some test client certificates for testing mutual TLS (in
certs/in the acceptance test directory) and run the acceptance test suite against your locally running credhub server.Cleaning up orphaned encrypted_value records
To clean up orphaned
encrypted_valuerecords from CredHub version 2.12.70 and earlier (https://github.com/cloudfoundry/credhub/issues/231), follow the steps decribed in Cleaning up orphaned encrypted_value records.