Target audience: Engineers transitioning from ALM tools (Jama,
Codebeamer, DOORS) to code-based requirements management with
sphinx-needs.
Traditional Application Lifecycle Management (ALM) tools like Jama, Codebeamer,
and IBM DOORS provide sophisticated built-in access management. These tools offer:
Role-based permissions - Define who can read, edit, or approve specific requirement types
Field-level access - Control visibility of sensitive attributes
Approval workflows - Require sign-off from designated reviewers
Audit trails - Track every change with user attribution
When transitioning to code-based requirements management with sphinx-needs,
this built-in access control disappears. Repository access typically means
access to everything within that repository.
This chapter explores strategies to achieve similar access control objectives
within a code-based workflow.
The fundamental difference between ALM tools and code-based requirements
management lies in how access control is enforced:
ALM Model: The tool acts as gatekeeper
flowchart LR
U[User] --> |"Permission Check"| T[ALM Tool]
T --> |"Allowed?"| D[Requirements Data]
Code-Based Model: Version control + review workflows
flowchart LR
U[User] --> R[Repository]
R --> |"PR Review"| M[Merge Gate]
M --> D[Requirements Data]
The key insight is that control shifts from “who can edit” to “what gets merged”.
In the ALM world, the tool prevents unauthorized changes. In the code-based world,
anyone with repository access can propose changes, but review workflows and
automation determine what actually makes it into the main branch.
This shift brings benefits:
Transparency - All changes are visible in version control history
Collaboration - Easier to propose and discuss changes
Auditability - Git provides a complete change log
But also challenges:
No built-in field-level security - Repository access = access to all content
Different mental model - Engineers must adapt their expectations
Concept: Use separate repositories with different access permissions,
then include them as submodules in your main documentation project.
Use case: Hardware requirements managed by the hardware team,
safety requirements managed by the safety team, each in their own
access-controlled repository.
# Add a submodule for hardware requirements
gitsubmoduleaddgit@github.com:company/hw-requirements.gitdocs/external/hw-reqs
# Add a submodule for safety requirements (restricted access)
gitsubmoduleaddgit@github.com:company/safety-requirements.gitdocs/external/safety-reqs
# Initialize and update submodules
gitsubmoduleupdate--init--recursive
Concept: Build requirements documentation separately, publish the
needs.json as a release artifact, and import it in consumer repositories
using sphinx-needs external needs feature.
Use case: A platform team publishes interface requirements that
multiple product teams consume without needing access to the source.
..req:: Product shall use platform authentication
:id: PROD_REQ_001
:links: PLAT_AUTH_001
This requirement implements platform requirement :need:`PLAT_AUTH_001`
from the platform team.
sequenceDiagram
participant PT as Platform Team Repo
participant CI as CI/CD Pipeline
participant GH as GitHub Releases
participant PR as Product Team Repo
PT->>CI: Push/Tag release
CI->>CI: Build sphinx docs
CI->>GH: Publish needs.json artifact
PR->>GH: Fetch needs.json
PR->>PR: Build with external_needs
Note over PR: Links resolve to platform docs
Concept: Use Google’s Copybara tool to synchronize requirements between
repositories with transformations that can filter or modify content during sync.
Use case: Internal requirements repository synced to an external-facing
repository with sensitive fields (contacts, internal notes) removed.
Tip
Copybara is particularly powerful when you need to share some requirements
externally but keep certain metadata internal.
# One-time sync
copybaracopy.bara.skysync-requirements
# In CI/CD - sync on every push to main
copybaracopy.bara.skysync-requirements--git-destination-non-fast-forward
For a complete example of a documentation build workflow with GitHub Actions,
see this repository’s workflow in .github/workflows/gh_pages.yml or view it on
GitHub.
Custom Validation Scripts
For additional validation beyond what ubCode provides:
# file: .github/workflows/validate-requirements.ymlname:Validate Requirementson:[pull_request]jobs:validate:runs-on:ubuntu-lateststeps:-uses:actions/checkout@v4-name:Build documentation (strict mode)run:|pip install sphinx sphinx-needssphinx-build -W -b html docs docs/_build/html-name:Validate need constraintsrun:|# Check all requirements have required fieldspython scripts/check_constraints.py docs/_build/html/needs.json-name:Check for forbidden patternsrun:|# Ensure no internal-only markers in public docs! grep -r "INTERNAL_ONLY" docs/requirements/
For organizations with enterprise-grade access management requirements,
ubTrace from useblocks provides comprehensive
access control as a managed solution.
Multi-tool workflows - Need to integrate sphinx-needs with existing ALM tools
Enterprise scale - Large organizations with complex permission requirements
Managed solution - Prefer commercial support over DIY approaches
ubTrace is part of the useblocks commercial offering alongside
ubConnect for ALM data synchronization and
ubCode VS Code extension for VS Code integration.
See also
Contact useblocks for enterprise requirements management solutions:
https://useblocks.com