diff options
author | Micah Anderson <micah@leap.se> | 2015-09-03 13:03:01 -0400 |
---|---|---|
committer | Micah Anderson <micah@leap.se> | 2015-09-08 12:06:51 -0400 |
commit | ffd340e7b014bc9f35fb6f9365230d483650cc1d (patch) | |
tree | d82df5b52f7bbe3407a9166bfd85ee8e7b3243c8 /puppet/modules/site_postfix/templates | |
parent | be8f7335cc273f85a1949557962dd65d88548679 (diff) |
rewrite openpgp header to be always correct (#7413)
The openpgp header added by the client is sometimes incorrect, because
the client doesn't actually know what the proper URL is for the
webapp. The server knows, however.
Change-Id: I2243b19a6337d8e0be97590e2ca9c9c0b0fffdac
Diffstat (limited to 'puppet/modules/site_postfix/templates')
-rw-r--r-- | puppet/modules/site_postfix/templates/checks/rewrite_openpgp_headers.erb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/puppet/modules/site_postfix/templates/checks/rewrite_openpgp_headers.erb b/puppet/modules/site_postfix/templates/checks/rewrite_openpgp_headers.erb new file mode 100644 index 00000000..7af14f7d --- /dev/null +++ b/puppet/modules/site_postfix/templates/checks/rewrite_openpgp_headers.erb @@ -0,0 +1,13 @@ +# THIS FILE IS MANAGED BY PUPPET +# +# This will replace the OpenPGP header that the client adds, because it is +# sometimes incorrect (due to the client not always knowing what the proper URL +# is for the webapp). +# e.g. This will rewrite this header: +# OpenPGP: id=4C0E01CD50E2F653; url="https://leap.se/key/elijah"; preference="signencrypt +# with this replacement: +# OpenPGP: id=4C0E01CD50E2F653; url="https://user.leap.se/key/elijah"; preference="signencrypt +# +# Note: whitespace in the pattern is represented by [[:space:]] to avoid these warnings from postmap: +# "record is in "key: value" format; is this an alias file?" and "duplicate entry" +/^(OpenPGP:[[:space:]]id=[[:alnum:]]+;[[:space:]]url="https:\/\/)<%= @domain %>(\/key\/[[:alpha:]]+";.*)/i REPLACE ${1}<%= @correct_domain %>${2} |