From 1a9d7f8c5b86080587f0722028d7c3d5cfafd3e0 Mon Sep 17 00:00:00 2001 From: Andrew Block Date: Fri, 1 Jan 2021 11:37:43 -0600 Subject: [PATCH] Initial elytron work --- src/main/resources/elytron | 59 ++++++++++++++++++++++++++++++++++++++ src/main/resources/rules | 1 + 2 files changed, 60 insertions(+) create mode 100644 src/main/resources/elytron diff --git a/src/main/resources/elytron b/src/main/resources/elytron new file mode 100644 index 0000000..60ae437 --- /dev/null +++ b/src/main/resources/elytron @@ -0,0 +1,59 @@ +name=elytron +getContents=/subsystem=elytron:read-resource(recursive=true) +server.preprocess.prepend=/elytron + +prefix.undefine=undefine:/elytron/ +undefine.rule.1=/subsystem=elytron${cmdpath(${path(..)})}:undefine-attribute(name=${name(.)}) +undefine.refresh=true + +match.modifyProperty=modify:/elytron/* +modifyProperty.rule=/subsystem=elytron:write-attribute(name=${name(.)},value=${value(.)}) + +prefix.undefine=undefine:/elytron/ +undefine.rule.1=/subsystem=logging${cmdpath(${path(..)})}:undefine-attribute(name=${name(.)}) +undefine.refresh=true + +match.addKeyStore=add:/elytron/key-store/* +addKeyStore.rule=/subsystem=elytron/key-store=${name(.)}:add(credential-reference=${value(credential-reference)}, ${if-defined (type),(,type=${value(type)})}, ${if-defined (path),(,path=${value(path)})}) +addKeyStore.precedence=10 +addKeyStore.refresh=true + +match.removeKeyStore=remove:/elytron/key-store/* +removeKeyStore.rule=/subsystem=elytron/key-store=${name(.)}:remove +removeKeyStore.refresh=true +removeKeyStore.precedence=10 + +match.modifyKeyStore=modify:/elytron/key-store/*/* +modifyKeyStore.rule.1=/subsystem=elytron/key-store=${name(..)}:write-attribute(name=${name(.)},value=${value(.)}) +modifyKeyStore.rule.2=:reload +modifyKeyStore.precedence=10 + +match.addKeyManager=add:/elytron/key-manager/* +addKeyManager.rule=/subsystem=elytron/key-manager=${name(.)}:add(credential-reference=${value(credential-reference)}, key-store=${value(key-store)}, , ${if-defined (algorithm),(,algorithm=${value(algorithm)})}) +addKeyManager.precedence=20 +addKeyManager.refresh=true + +match.removeKeyManager=remove:/elytron/key-manager/* +removeKeyManager.rule=/subsystem=elytron/key-manager=${name(.)}:remove +removeKeyManager.refresh=true +removeKeyManager.precedence=20 + +match.modifyKeyManager=modify:/elytron/key-manager/*/* +modifyKeyManager.rule.1=/subsystem=elytron/key-manager=${name(..)}:write-attribute(name=${name(.)},value=${value(.)}) +modifyKeyManager.rule.2=:reload +modifyKeyManager.precedence=20 + +match.addServerSslContext=add:/elytron/server-ssl-context/* +addServerSslContext.rule=/subsystem=elytron/server-ssl-context=${name(.)}:add(key-manager=${value(key-manager)}) +addServerSslContext.precedence=30 +addServerSslContext.refresh=true + +match.removeServerSslContext=remove:/elytron/server-ssl-context/* +removeServerSslContext.rule=/subsystem=elytron/server-ssl-context=${name(.)}:remove +removeServerSslContext.refresh=true +removeServerSslContext.precedence=30 + +match.modifyServerSslContext=modify:/elytron/server-ssl-context/*/* +modifyServerSslContext.rule.1=/subsystem=elytron/server-ssl-context=${name(..)}:write-attribute(name=${name(.)},value=${value(.)}) +modifyServerSslContext.rule.2=:reload +modifyServerSslContext.precedence=30 \ No newline at end of file diff --git a/src/main/resources/rules b/src/main/resources/rules index 219b618..84b83b0 100644 --- a/src/main/resources/rules +++ b/src/main/resources/rules @@ -47,3 +47,4 @@ configurable.29=teiid configurable.30=rbac configurable.31=interface configurable.32=keycloak +configurable.33=elyton