Multi tenant enterprise grade IAM implementation based on a geo-distributed layered Vault installation. Currently under active development of initial version.
needs:
- linux or macos system (only intel processors, for apple silicone using needs some changes in scripts)
- docker
./build.sh
possible options for build:
./build.sh plugins # build separate plugins
./build.sh authd # builds authd component
./build.sh cli # builds cli utility
./build.sh server-accessd # builds server-accessd component
./build.sh nss # builds nss component
./build.sh oidc-mock # builds oidc-mock for e2e tests purposes only
./build.sh vault # builds complete vault with plugins onboard
./build.sh vault --force # builds complete vault with plugins onboard (use after first build)
There are three possible modes of test and stage environment:
- One vault in dev mode, negentropy plugins are aside (SINGLE mode)
- Vaults with negentropy plugins onbоard (E2E mode, for E2E Tests in CI)
- Vaults with negentropy plugins onbоard, run under delve debugger (DEBUG mode)
./start.sh single
runs one vault at docker container, uses separate plugin binaries, placed at vault-plugins/build
./start.sh e2e
runs several vaults at docker-containers, uses complete vault binary with negentropy plugins onboard, placed at infra/common/vault/vault/bin
./start.sh debug
runs several vaults at docker-containers, each docker run under delve debugger server uses complete vault binary with negentropy plugins onboard, placed at infra/common/vault/vault/bin, need connection delve-client debuggers to localhost: 2345 and localhost:2346 (see docker/docker-compose.debug.yml)
- Zookepper, Kafka used to save data and communicate plugins.
- Kafdrop used to study Kafka
- test-server used as a sample of server under negentropy access control
- test-client used as a sample of user PC, accessing servers under negentropy access control
- oidc-mock provide mock of oidc-provider for tests
- run all components containers
- configure negentropy plugins
- export data for running tests and unsealing vaults
./run-e2e-tests.sh
-
No panic which can run at vault-plugins except:
- panic run (or not) depends on code compositions only
- panic run (or not) in tests runs
- panic at flant-gitops plugin
Check there is no panic with comment '// nolint:check_panic' at others places
-
Each new category stored in memdb should be mentioned at:
- memdb schema
- ~kafka_destination/vault.go isValidObjectType()` func
- ~kafka_destination/metadata.go
isValidObjectType()
func - ~kafka_source/self.go Restore() func (or ../root.go)
- checking of normal saving/restoration at e2e/tests/restoration/all_restoration_test.go
- Set configuration for your namespace in .helm/values.yaml (domain, balancer, bucket if needed)
Example:
load_balancer:
mynamespace: enabled
domain:
mynamespace: mynamespace-negentropy.flant.dev
- Go to teleport https://teleport.negentropy.flant.dev/ and connect to negentropy server console
- Set target namespace for negentropy (required)
Example:
export NS=mynamespace
- Set git branch for watching (required)
Example:
export GIT_BRANCH=myBranch
- Set INITIAL_LAST_SUCCESSFULL_COMMIT (required)
Example:
export INITIAL_LAST_SUCCESSFULL_COMMIT=49ddefbced3654c669f0d139be4690477d9bd5aa
- Set optional params GIT_REPO, REQUIRED_NUMBER_OF_SIGNATURES, GIT_POLL_PERIOD
export REQUIRED_NUMBER_OF_SIGNATURES=3 # default 0
export GIT_REPO=https://github.com/mygithub/negentropy.git # default https://github.com/flant/negentropy.git
export GIT_POLL_PERIOD=30m # default 1m
- Run bootstrap script
curl -s https://raw.githubusercontent.com/flant/negentropy/$GIT_BRANCH/bootstrap-kube.sh| bash