Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix register access #9

Closed
wants to merge 8 commits into from
Prev Previous commit
Fix uplink register access
Erikvv committed Jan 31, 2022
commit 0ba07593899896b671d4aea3340e99692c9623d2
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ clean-image:
ci-image-run:
# Every Makefile rule is run in its shell, so we need to couple these two so
# exported credentials are visible to the `docker run ...` command.
export $$(docker exec splunk-s3-tests-sim-$$BUILD_NUMBER uplink access register --access $$(docker exec splunk-s3-tests-sim-$$BUILD_NUMBER storj-sim network env GATEWAY_0_ACCESS) --auth-service http://authservice:8000 --format env); \
export $$(docker exec splunk-s3-tests-sim-$$BUILD_NUMBER uplink access register --access $$(docker exec splunk-s3-tests-sim-$$BUILD_NUMBER storj-sim network env GATEWAY_0_ACCESS) --auth-service authservice:7777 --ca-cert volumes/authservice/authservice-cert.pem --format env); \
docker run \
--network splunk-s3-tests-network-$$BUILD_NUMBER \
-e ENDPOINT=gateway:7777 -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e SECURE=0 \
@@ -56,11 +56,26 @@ ci-dependencies-start:
echo "*** storj-sim is not yet available; waiting for 3s..." && sleep 3; \
done

mkdir -p volumes/authservice

openssl req \
-x509 \
-newkey rsa:4096 \
-keyout volumes/authservice/authservice-key.pem \
-out volumes/authservice/authservice-cert.pem \
-days 3650 \
-nodes \
-subj '/CN=authservice' \
-addext "subjectAltName = DNS:authservice"

docker run \
--network splunk-s3-tests-network-$$BUILD_NUMBER --network-alias authservice \
--name splunk-s3-tests-authservice-$$BUILD_NUMBER \
--volume=$$PWD/volumes/authservice:/cert:ro \
--rm -d storjlabs/authservice:dev run \
--listen-addr :8000 \
--cert-file /cert/authservice-cert.pem \
--key-file /cert/authservice-key.pem \
--allowed-satellites $$(docker exec splunk-s3-tests-sim-$$BUILD_NUMBER storj-sim network env SATELLITE_0_ID)@ \
--auth-token super-secret \
--endpoint http://gateway:7777 \
@@ -92,6 +107,7 @@ ci-dependencies-clean:
-docker rmi golang:latest
-docker rmi redis:latest
-docker rmi postgres:latest
-rm -r volumes

.PHONY: ci-run
ci-run: build-image ci-network-create ci-dependencies-start ci-image-run