[[Elytron_and_Java_Authorization_Contract_for_Containers-JACC]]
= Elytron and Java Authorization Contract for Containers (JACC)

ifdef::env-github[]
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
endif::[]

[abstract]

This document will guide you on how to enable JACC for your deployments
using the default policy defined in the Elytron subsystem.

[[defining-a-jacc-policy-provider]]
== Defining a JACC Policy Provider

Elytron subsystem provides a built-in policy provider based on JACC
specification. This policy provider is active by default in the 
default configuration.

[[enabling-jacc-to-a-web-deployment]]
== Enabling JACC to a Web Deployment

You can enable JACC to web
deployments by executing the following command:

[source,options="nowrap"]
----
[standalone@localhost:9990 /] /subsystem=undertow/application-security-domain=other:add(http-authentication-factory=application-http-authentication,enable-jacc=true)
----

The command above defines a default security domain for applications if
none is provided in *jboss-web.xml.* In case you already have a
*application-security-domain* defined and just want to enable JACC you
can execute a command as follows:

[source,options="nowrap"]
----
[standalone@localhost:9990 /] /subsystem=undertow/application-security-domain=my-security-domain:write-attribute(name=enable-jacc,value=true)
----

[[enabling-jacc-to-a-ejb-deployment]]
== Enabling JACC to a EJB Deployment

You can enable JACC to EJB deployments by executing the following command:

[source,options="nowrap"]
----
[standalone@localhost:9990 /] /subsystem=ejb3/application-security-domain=other:add(security-domain=ApplicationDomain,enable-jacc=true)
----

The command above defines a default security domain for EJBs. In case
you already have an *application-security-domain* defined and just want
to enable JACC you can execute a command as follows:

[source,options="nowrap"]
----
[standalone@localhost:9990 /] /subsystem=ejb3/application-security-domain=my-security-domain:write-attribute(name=enable-jacc,value=true)
----

NOTE: References in this document to Java Authorization Contract for Containers (JACC) refer to Jakarta Authorization unless otherwise noted.
      References in this document to Enterprise JavaBeans (EJB) refer to the Jakarta Enterprise Beans unless otherwise noted.
