apache - Public Key Pinning not working -
hello trying implement public-key-pinning on apache server running proxy web-app, won't work (if enter wrong hash page still displayed instead of error, should shown in firefox or chrome). sure header correct – hash correct, have tested chrome.
my configdata is
<virtualhost *:443> servername subdomain.*******.***:443 sslcertificatefile /etc/apache2/ssl/___.crt sslcertificatekeyfile /etc/apache2/ssl/___.key sslcertificatechainfile /etc/apache2/ssl/___.ca header set public-key-pins "pin-sha256=\"****\"; pin-sha256=\"****\"; max-age=120; includesubdomains" <proxy *> order deny,allow allow </proxy> proxypass / ****:****/ proxypassreverse / ****:****/ <location /> order allow,deny allow </location> </virtualhost>
at first had 1 hash added second 1 in case required. doing wrong?
note: of course have mod_header enabled , loaded.
two hashes required , must 2 independent hashes. i.e. cannot pin cert , intermediate cert issued not independent. safety feature ensure have backup incase need it.
additionally policy accepted if passes cannot put in fake policy , watch fail because never accepted.
a tool check policy one: https://report-uri.io/home/pkp_analyse , other tools on same site generate policy: https://report-uri.io/home/pkp_hash
however need careful hpkp. it's easy block website and, hope don't take wrong way, doesn't sound understand hpkp suggest read more first.
there public-key-pins-report-only (which available in chrome @ present) , , allows test policy bit (well in chrome @ least) need use report-uri option (you can use above site collect reports if don't want write own service this).
i've active interest in and, if people don't mind me linking here, i've blogged in more detail here: https://www.tunetheweb.com/security/http-security-headers/hpkp/. think it's potentially dangerous option needs careful consideration before implementing.
Comments
Post a Comment