Configuring JWT on Liberty
Configure jwtBuilder and resourceAdapter in Liberty server.xml.
- Include the following features in your Liberty
server.xml
<featureManager> <feature>cdi-1.2</feature> <feature>jca-1.7</feature> <feature>jsp-2.3</feature> <feature>localConnector-1.0</feature> <feature>servlet-3.1</feature> <feature>jwt-1.0</feature> <feature>ejbHome-3.2</feature> <feature>ejbRemote-3.2</feature> <feature>ejbLite-3.2</feature> <feature>mpConfig-1.4</feature> </featureManager>
- Define a JwtBuilder
section
<jwtBuilder id="Jwtb1" sharedKey="secret" signatureAlgorithm="HS256" expiresInSeconds="90s" />
- Deploy the eci resource adapter cicseci.rar shipped with CICS
TG
<resourceAdapter autoStart="true" id="eciResourceAdapter" location=”cicseci.rar"> </resourceAdapter>
- Deploy the ECIJWT application shipped with CICS TG
SDK.
<enterpriseApplication id="ECIJWT" location="ECIJWT.ear" name="ECIJWT"> <classloader classProviderRef="eciResourceAdapter" /> </enterpriseApplication>
- Define a variable cicstg_claim which contains the distributed
user.
<variable name=“cicstg_myclaim” value=“RheaPark” />