- How do I install itk-dev/vault in a Laravel application?
- Install it with Composer using composer require itk-dev/vault, then let Laravel's package auto-discovery register the service provider and facade. Publish the package configuration with the vendor:publish command and set the Vault address, token and namespace through environment variables rather than committing them to source control. Before rolling it out, confirm the Composer constraints match your project's Laravel and PHP versions in a disposable application.
- Which Laravel and PHP versions does itk-dev/vault support?
- The package overview does not publish a version support matrix, so check the composer.json constraints and the repository's CI configuration for the exact Laravel and PHP ranges. Validate against your organisation's baseline, including Laravel 10, 11 or 12 if those are in use. Run a quick install and secret read in a throwaway Laravel service to confirm it resolves cleanly on your target versions.
- How do I configure the Vault connection address, token and namespace?
- Configuration is environment-driven: you set the Vault server address, an access token and, for Vault Enterprise, a namespace, which the package reads through Laravel's config system. Publish the config file and map the values to environment variables so the token never lives in the repository. In production, prefer short-lived tokens issued by a workload identity mechanism over long-lived static tokens stored in .env.
- Which Vault authentication methods does itk-dev/vault support?
- The documented configuration covers address, token and namespace, which suggests token-based authentication is the primary supported path. Whether AppRole, Kubernetes, JWT/OIDC or other auth backends are supported is not stated in the overview and should be verified in the source before you design around it. If your platform relies on workload identity rather than static tokens, prove that flow first in a non-critical service.
- Does itk-dev/vault support Vault KV v1 and KV v2 secret engines?
- The package advertises read and write support for secrets stored in Vault, but the overview does not specify which secret engines or API paths are covered. KV v2 behaves differently from KV v1 because of versioned paths and metadata, so test read, write and version handling against your actual engine. Confirm the behaviour with a spike against a real Vault instance rather than assuming compatibility.
- How do I test a Laravel app that reads secrets from Vault?
- Keep Vault reads behind a small abstraction or config fallback so tests do not need a live Vault server. In CI you can run a disposable Vault container in dev mode and seed the paths your test suite needs, which also exercises your real authentication and path configuration. Because the package is lightly adopted, add explicit tests around failure modes such as an unreachable Vault, an expired token and a missing secret path.
- How does itk-dev/vault behave with config caching, queue workers and Laravel Octane?
- Secret resolution can happen at boot, on demand, or through caching, and the difference matters across runtime paths. Test php artisan config:cache, queue workers, scheduled jobs, artisan commands and Octane workers separately, because long-lived processes may hold stale secrets or fail to reconnect after a token expires. Never allow secret values to be baked into the cached configuration file, since that defeats the purpose of moving them to Vault.
- Does itk-dev/vault handle token renewal, lease renewal and secret revocation?
- The overview does not describe token renewal, lease management, caching or revocation, so treat these as open questions to verify in the code. Check what happens when a token reaches its TTL, whether leases are renewed or renewed lazily, and how the application behaves when Vault is unavailable. Plan an explicit fallback and rollback path, such as environment variables, for outages during an incident.
- Is itk-dev/vault safe to use in production given its low adoption?
- The repository has very limited traction: one star, zero dependents, a low score and a last release in October 2024, which means little peer validation and elevated maintainer risk. Low adoption is not proof of poor quality, but because the package handles credentials, defects can become security incidents rather than ordinary bugs. Review the licence, security disclosure policy, test coverage and release cadence, and budget for forking or vendoring the package if upstream maintenance stalls.
- How do I migrate from .env secrets to Vault with this package, and what are the alternatives?
- Start with a secret inventory, classify what can move first, and pilot the package in one non-critical Laravel service with feature-flagged Vault reads and environment-variable fallback. Progress from development to staging to production only after verifying authentication, retrieval, rotation, rollback and observability, then document a golden-path configuration and runbook. Alternatives include calling the Vault HTTP API directly, using another PHP Vault client, or wrapping whichever client you choose behind an internal abstraction so applications are not tightly coupled to a single low-adoption dependency.