2 # ABFAB Trust router policies.
12 if (TLS-PSK-Identity) {
13 # TODO: may need to check trust-router-apc as well
14 if ("%{psksql:select distinct keyid from authorizations_keys where keyid = '%{tls-psk-identity}' and '%{trust-router-coi}' like coi and '%{gss-acceptor-realm-name}' like acceptor_realm and '%{gss-acceptor-host-name}' like hostname;}") {
24 # check that the acceptor host name is correct
25 if ("%{client:gss_acceptor_host_name}" && "%{gss-acceptor-host-name}") {
26 if ("%{client:gss_acceptor_host_name}" != "%{gss-acceptor-host-name}") {
31 # set trust-router-coi attribute from the client configuration
32 if ("%{client:trust_router_coi}") {
33 update proxy-request {
34 Trust-Router-COI := "%{client:trust_router_coi}"
38 # set gss-acceptor-realm-name attribute from the client configuration
39 if ("%{client:gss_acceptor_realm_name}") {
40 update proxy-request {
41 GSS-Acceptor-Realm-Name := "%{client:gss_acceptor_realm_name}"
46 # A policy which is used to validate channel-bindings.
48 abfab_channel_bindings {
49 if (GSS-Acceptor-Service-Name && (outer.request:GSS-Acceptor-Service-Name != GSS-Acceptor-Service-Name)) {
53 if (GSS-Acceptor-Host-Name && outer.request:GSS-Acceptor-Host-Name != GSS-Acceptor-Host-Name ) {
57 if (GSS-Acceptor-Realm-Name && outer.request:GSS-Acceptor-Realm-Name != GSS-Acceptor-Realm-Name ) {
61 if (GSS-Acceptor-Service-Name || GSS-Acceptor-Realm-Name || GSS-Acceptor-Host-Name) {
63 Chbind-Response-Code := success
67 # ACK the attributes in the request.
69 # If any one of these attributes don't exist in the request,
70 # then they won't be copied to the reply.
73 GSS-Acceptor-Service-Name = &GSS-Acceptor-Service-Name
74 GSS-Acceptor-Host-Name = &GSS-Acceptor-Host-Name
75 GSS-Acceptor-Realm-Name = &GSS-Acceptor-Realm-Name
80 # Return "handled" so that the "authenticate" section isn't used.