Skip to main content

The most recent patch for this version is 26.1.2.  Learn more  

Version: 26.1

Gradle tasks and dependency configurations

This section details the Gradle tasks available for building, testing, and deploying your ALFA project, as well as the dependency configurations used to manage external libraries. Understanding these tasks and configurations is crucial for efficiently managing your ALFA project's lifecycle.

Tasks

You can execute the following Gradle tasks from your IDE, the command line, or a build automation tool like Jenkins or Azure DevOps.

TaskDescription
buildAuthzDomainCompiles the authorization domain into a single YAML file (build/alfa/ads/domain.yaml) suitable for uploading to ADM or providing to ADS.
compileAlfaCompiles all ALFA policies to XACML and writes the output to build/alfa/domain/xacmlSpecifications.
compileAlfaToPackageCompiles all ALFA policies to XACML and bundles them into a policy package (build/alfa/domain/package/policy_package.zip), which you can upload to Axiomatics Services Manager (ASM).
stageDeploymentPrepares the ADS deployment within the build/install/deployment directory. This deployment package includes the ADS binaries, domain.yaml, deployment.yaml, the software license, and custom attribute connectors. This directory serves as the build context root directory for creating a container image using tools such as Docker, Buildah, Podman, Kaniko, or Buildkit.
runAdsRuns the latest ADS locally using the authorization domain from src/ and the deployment descriptor from deployment.yaml.
NOTE: You need a valid software license in license/ to run ADS.
Press Ctrl+C to stop the service.
IMPORTANT: Structure the deployment.yaml file according to the DomainOpens in a new tab section of the latest Access Decision Service documentation.
testRuns all unit, integration, and system tests and generates test reports in build/reports/tests/. The reports indicate which tests passed or failed and provide output and stack traces.

Build a container image with ADS

Axiomatics Policy DevOps (APD) does not include a task for building a container image with latest ADS binaries. Instead, use the stageDeployment task to prepare the build context in the build/install/deployment directory.

Once prepared, call your preferred image build tool to create the image. The /Dockerfile will be automatically copied into this build context directory. Tailor it to your needs if needed.

Dependency configurations

Gradle's dependency configurations manage the classpath for different tasks. The following configurations help manage dependencies for your ALFA project:

ConfigurationDescription
pipAdd any extra attribute connector dependencies. This configuration already includes Axiomatics' Table, SQL, LDAP, HTTP, and Parser attribute connectors.
testImplementationAdd any additional dependencies required for executing tests.
adsCompileAdd any extra dependencies needed for compilation.
policyInclude any external ALFA policies.

To add a dependency, use the following syntax in your build.gradle file:

build.gradle
    dependencies {
pip '<group>:<name>:<version>'
}