Installation
The libraries are published to Archenstack's GitLab Package Registry (project
packages/archenstack on git.atolytix.com). You depend on them the way you depend on
anything else — pin a name and version — and point your package manager's install
location at the registry once. The name and version are the stable part; the install
location is a single line you can change. When a package later goes public (PyPI, npm,
Maven Central, crates.io), you drop that one line and nothing else moves.
The registry is private, so each install location authenticates. Create one deploy
token: the Archenstack project → Settings → Repository → Deploy tokens, scope
read_package_registry. GitLab shows a username and a token value once — those
are TOKEN_NAME and TOKEN below. A Personal Access Token with read_api works too.
- Python / Django
- Node.js / Web
- Java / Spring
- Go
- Rust
Point pip at the project index (keep PyPI as the fallback — the GitLab index doesn't
proxy it, and archenstack-rbac-django pulls Django + DRF from PyPI):
# pip.conf (project-local, or ~/.config/pip/pip.conf)
[global]
index-url = https://TOKEN_NAME:TOKEN@git.atolytix.com/api/v4/projects/16/packages/pypi/simple
extra-index-url = https://pypi.org/simple
pip install archenstack-rbac # the pure core
pip install archenstack-rbac-django # the Django/DRF adapter (pulls the core + Django + DRF)
Map just the @archenstack scope to the registry in a project-local .npmrc — everything
else keeps resolving from npmjs:
# .npmrc
@archenstack:registry=https://git.atolytix.com/api/v4/projects/16/packages/npm/
//git.atolytix.com/api/v4/projects/16/packages/npm/:_authToken=TOKEN
npm install @archenstack/rbac-node # server core + Express adapter
npm install @archenstack/rbac-web # front-end client + React UI
Because the packages are scoped, only @archenstack/* resolves from GitLab; your public
dependencies still come from npmjs. So a normal npm install in a project with other
dependencies just works — no default-registry juggling.
Add the registry as a repository and authenticate the gitlab-maven server:
<!-- settings.xml -->
<servers>
<server>
<id>gitlab-maven</id>
<configuration><httpHeaders><property>
<name>Deploy-Token</name><value>TOKEN</value>
</property></httpHeaders></configuration>
</server>
</servers>
<!-- your pom.xml -->
<repositories>
<repository>
<id>gitlab-maven</id>
<url>https://git.atolytix.com/api/v4/groups/packages/-/packages/maven</url>
</repository>
</repositories>
<dependency>
<groupId>io.archenstack</groupId>
<artifactId>archenstack-rbac-spring-boot-starter</artifactId>
<version>1.0.0</version>
</dependency>
Spring Boot and the rest of your transitive dependencies resolve from Maven Central as
usual; only the io.archenstack artifacts come from GitLab.
Go has no registry upload — the module is served straight from the git repository, and the module path is that repository's path.
While the repository is private, GOPRIVATE keeps the module off the public module proxy
and checksum database so go get fetches it directly over authenticated git:
go env -w GOPRIVATE=github.com/archenstack/*
# HTTPS auth, via ~/.netrc:
# machine github.com login USERNAME password TOKEN
go get github.com/archenstack/archenstack-rbac-go@v1.0.0
import rbac "github.com/archenstack/archenstack-rbac-go"
Rust consumes the crate as a git dependency (GitLab's Cargo registry isn't production-ready), pinned to a release tag:
# Cargo.toml
[dependencies]
archenstack_rbac = { git = "https://git.atolytix.com/packages/archenstack.git", tag = "archenstack-rbac-rust/v1.0.0" }
For a private repo, let cargo authenticate through git: export CARGO_NET_GIT_FETCH_WITH_CLI=true.
The instance-side reader
A provisioned tenant's .env holds wrapped secrets, which the instance exchanges for their
real values at boot. That half ships as its own library so an application does not have to
implement the exchange — see Wrapped secrets for the mechanism.
All five are at 1.0.0 and install from the same registries as the libraries above:
| Language | Install |
|---|---|
| Python | pip install archenstack-instance-env |
| Node.js | npm install @archenstack/instance-env |
| Java | io.archenstack:archenstack-instance-env:1.0.0 |
| Go | go get github.com/archenstack/archenstack-instance-env-go@v1.0.0 |
| Rust | archenstack_instance_env = { git = "https://git.atolytix.com/packages/archenstack.git", tag = "archenstack-instance-env-rust/v1.0.0" } |
Going public later
The app keeps the same package name and version; you only change the install location:
| Ecosystem | Change | Falls back to |
|---|---|---|
| Python | delete the index-url line | PyPI |
| Node | swap the registry line | registry.npmjs.org |
| Java | delete the <repository> block | Maven Central |
| Rust | archenstack_rbac = "1.0" instead of the git dep | crates.io |
| Go | drop the path from GOPRIVATE | proxy.golang.org |