Mailing List Archive

Varnish 4.1 - "Hash" in varnishlog is.. masked
Hey there,

Per https://varnish-cache.org/docs/4.1/reference/vsl.html <https://varnish-cache.org/docs/4.1/reference/vsl.html>, “Hash” is masked by default.

I am trying to use varnishlog to see the values added to the hash and I just can’t find a way to show it.

Of course, I can use std to log or various other techniques, but am interested in seeing the Hash like we used to with Varnish 3.

Any hints?

Thanks a lot!

--
Vlad Rusu
skypeid: rusu.h.vlad | cell: +40758066019

Lola Tech | lola.tech <https://lola.tech/>
Re: Varnish 4.1 - "Hash" in varnishlog is.. masked [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 02/21/2017 08:46 AM, Vlad Rusu wrote:
>
> Per https://varnish-cache.org/docs/4.1/reference/vsl.html, ?Hash?
> is masked by default.
>
> I am trying to use varnishlog to see the values added to the hash
> and I just can?t find a way to show it.

Start varnishd with: -p vsl_mask=+Hash

The default setting for vsl_mask is:
- -VCL_trace,-WorkThread,-Hash,-VfpAcct

Documentation here:
https://www.varnish-cache.org/docs/4.1/reference/varnishd.html#vsl-mask


HTH,
Geoff
- --
** * * UPLEX - Nils Goroll Systemoptimierung

Scheffelstra?e 32
22301 Hamburg

Tel +49 40 2880 5731
Mob +49 176 636 90917
Fax +49 40 42949753

http://uplex.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJYq/LrAAoJEOUwvh9pJNURmIkP/iVnEpxv1/h/z9Fa/h7njuOW
vHapCbAeXpji7tD5uapWPb8a3h8vEAq1hxVPL2+eSAcrrSh4tsUaF0GaW83UTNms
aOTecGxlF/n0HTCE/HAyKHgOD7B5dffeq1sm52UeB/mvz4GbhVg/K77tZIxNc12g
HrtP0SXsKqYIHasE2QBryAdlkFBA7b36oyCGELnw5fpLsBqiJQ1AmjcmV71Oz6YE
9CkPK6e5FHRlMaKKPcbiI6upd6lGHh7SKUEOdVLI8ne4luvJQqEArvv1s6ZpHoY8
744M/yxnoDOyRBnr+pGSOo6Vv+HlN4+2vh8mXzgtD7PxjLjp3H9ooPbfyzcGmuPK
i9PxuuKu6Epat+C38Y+VzPvbZeCO/S1ZvOepR7eId8Honwh/bAxfdOriqmVETfsI
YPM+iEYWkDHvtjWwDHhkmfW6cAvWh564j2JZT0hAmY0INFpiZ5uMohId3nAUZ9/D
FIQnEaO+67Y89nvkQZlcSB3h/D0Tu67oSuGs6JxqcND48Z1pIDsznxunl9Hly2Vw
jzRg6a+jW/ZO/inQpA76SHhrlcEN6peakaGusHT/MrJPlLOkhzt2vGYxiusKvA2f
ddVa6XWPjugcFLxEHgOck+QCDFBkz8Y+qVdWKEA5jHhFlc3bvmla+3zU/olEeyvk
+q4oQ5Kg6zhVlY9bssZZ
=22Ly
-----END PGP SIGNATURE-----

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: Varnish 4.1 - "Hash" in varnishlog is.. masked [ In reply to ]
Thanks a lot!

--
Vlad Rusu
skypeid: rusu.h.vlad | cell: +40758066019

Lola Tech | lola.tech <https://lola.tech/>
> On 21 Feb 2017, at 09:57, Geoff Simmons <geoff@uplex.de> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On 02/21/2017 08:46 AM, Vlad Rusu wrote:
>>
>> Per https://varnish-cache.org/docs/4.1/reference/vsl.html, “Hash”
>> is masked by default.
>>
>> I am trying to use varnishlog to see the values added to the hash
>> and I just can’t find a way to show it.
>
> Start varnishd with: -p vsl_mask=+Hash
>
> The default setting for vsl_mask is:
> - -VCL_trace,-WorkThread,-Hash,-VfpAcct
>
> Documentation here:
> https://www.varnish-cache.org/docs/4.1/reference/varnishd.html#vsl-mask
>
>
> HTH,
> Geoff
> - --
> ** * * UPLEX - Nils Goroll Systemoptimierung
>
> Scheffelstraße 32
> 22301 Hamburg
>
> Tel +49 40 2880 5731
> Mob +49 176 636 90917
> Fax +49 40 42949753
>
> http://uplex.de
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQIcBAEBCAAGBQJYq/LrAAoJEOUwvh9pJNURmIkP/iVnEpxv1/h/z9Fa/h7njuOW
> vHapCbAeXpji7tD5uapWPb8a3h8vEAq1hxVPL2+eSAcrrSh4tsUaF0GaW83UTNms
> aOTecGxlF/n0HTCE/HAyKHgOD7B5dffeq1sm52UeB/mvz4GbhVg/K77tZIxNc12g
> HrtP0SXsKqYIHasE2QBryAdlkFBA7b36oyCGELnw5fpLsBqiJQ1AmjcmV71Oz6YE
> 9CkPK6e5FHRlMaKKPcbiI6upd6lGHh7SKUEOdVLI8ne4luvJQqEArvv1s6ZpHoY8
> 744M/yxnoDOyRBnr+pGSOo6Vv+HlN4+2vh8mXzgtD7PxjLjp3H9ooPbfyzcGmuPK
> i9PxuuKu6Epat+C38Y+VzPvbZeCO/S1ZvOepR7eId8Honwh/bAxfdOriqmVETfsI
> YPM+iEYWkDHvtjWwDHhkmfW6cAvWh564j2JZT0hAmY0INFpiZ5uMohId3nAUZ9/D
> FIQnEaO+67Y89nvkQZlcSB3h/D0Tu67oSuGs6JxqcND48Z1pIDsznxunl9Hly2Vw
> jzRg6a+jW/ZO/inQpA76SHhrlcEN6peakaGusHT/MrJPlLOkhzt2vGYxiusKvA2f
> ddVa6XWPjugcFLxEHgOck+QCDFBkz8Y+qVdWKEA5jHhFlc3bvmla+3zU/olEeyvk
> +q4oQ5Kg6zhVlY9bssZZ
> =22Ly
> -----END PGP SIGNATURE-----
Re: Varnish 4.1 - "Hash" in varnishlog is.. masked [ In reply to ]
Are those %00 expected at the end of the Hash?

...
- ReqURL /sites/all/themes/allegiant3/g4www-style/dist/styles/style.min.1.css
...
- VCL_call RECV
...
- VCL_call HASH
- Hash "/sites/all/themes/allegiant3/g4www-style/dist/styles/style.min.1.css%00"
- Hash "444%00"
- Hash “www…..com%00"


Thanks!

--
Vlad Rusu
skypeid: rusu.h.vlad | cell: +40758066019

Lola Tech | lola.tech <https://lola.tech/>
> On 21 Feb 2017, at 09:58, Vlad Rusu <vlad.rusu@lola.tech> wrote:
>
> Thanks a lot!
>
> --
> Vlad Rusu
> skypeid: rusu.h.vlad | cell: +40758066019
>
> Lola Tech | lola.tech <https://lola.tech/>
>> On 21 Feb 2017, at 09:57, Geoff Simmons <geoff@uplex.de <mailto:geoff@uplex.de>> wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>> On 02/21/2017 08:46 AM, Vlad Rusu wrote:
>>>
>>> Per https://varnish-cache.org/docs/4.1/reference/vsl.html <https://varnish-cache.org/docs/4.1/reference/vsl.html>, “Hash”
>>> is masked by default.
>>>
>>> I am trying to use varnishlog to see the values added to the hash
>>> and I just can’t find a way to show it.
>>
>> Start varnishd with: -p vsl_mask=+Hash
>>
>> The default setting for vsl_mask is:
>> - -VCL_trace,-WorkThread,-Hash,-VfpAcct
>>
>> Documentation here:
>> https://www.varnish-cache.org/docs/4.1/reference/varnishd.html#vsl-mask <https://www.varnish-cache.org/docs/4.1/reference/varnishd.html#vsl-mask>
>>
>>
>> HTH,
>> Geoff
>> - --
>> ** * * UPLEX - Nils Goroll Systemoptimierung
>>
>> Scheffelstraße 32
>> 22301 Hamburg
>>
>> Tel +49 40 2880 5731
>> Mob +49 176 636 90917
>> Fax +49 40 42949753
>>
>> http://uplex.de
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v2
>>
>> iQIcBAEBCAAGBQJYq/LrAAoJEOUwvh9pJNURmIkP/iVnEpxv1/h/z9Fa/h7njuOW
>> vHapCbAeXpji7tD5uapWPb8a3h8vEAq1hxVPL2+eSAcrrSh4tsUaF0GaW83UTNms
>> aOTecGxlF/n0HTCE/HAyKHgOD7B5dffeq1sm52UeB/mvz4GbhVg/K77tZIxNc12g
>> HrtP0SXsKqYIHasE2QBryAdlkFBA7b36oyCGELnw5fpLsBqiJQ1AmjcmV71Oz6YE
>> 9CkPK6e5FHRlMaKKPcbiI6upd6lGHh7SKUEOdVLI8ne4luvJQqEArvv1s6ZpHoY8
>> 744M/yxnoDOyRBnr+pGSOo6Vv+HlN4+2vh8mXzgtD7PxjLjp3H9ooPbfyzcGmuPK
>> i9PxuuKu6Epat+C38Y+VzPvbZeCO/S1ZvOepR7eId8Honwh/bAxfdOriqmVETfsI
>> YPM+iEYWkDHvtjWwDHhkmfW6cAvWh564j2JZT0hAmY0INFpiZ5uMohId3nAUZ9/D
>> FIQnEaO+67Y89nvkQZlcSB3h/D0Tu67oSuGs6JxqcND48Z1pIDsznxunl9Hly2Vw
>> jzRg6a+jW/ZO/inQpA76SHhrlcEN6peakaGusHT/MrJPlLOkhzt2vGYxiusKvA2f
>> ddVa6XWPjugcFLxEHgOck+QCDFBkz8Y+qVdWKEA5jHhFlc3bvmla+3zU/olEeyvk
>> +q4oQ5Kg6zhVlY9bssZZ
>> =22Ly
>> -----END PGP SIGNATURE-----
>
Re: Varnish 4.1 - "Hash" in varnishlog is.. masked [ In reply to ]
Hello Vlad,

Normally, varnish is configured using either the command line or using
varnishadm. You can have a look at "varnishadm param.show vsl_mask"

But we could probably have a pointer in the doc. Care to do it?

--
Guillaume Quintard
Re: Varnish 4.1 - "Hash" in varnishlog is.. masked [ In reply to ]
On Tue, Feb 21, 2017 at 8:46 AM, Vlad Rusu <vlad.rusu@lola.tech> wrote:
> Hey there,
>
> Per https://varnish-cache.org/docs/4.1/reference/vsl.html, “Hash” is masked
> by default.
>
> I am trying to use varnishlog to see the values added to the hash and I just
> can’t find a way to show it.
>
> Of course, I can use std to log or various other techniques, but am
> interested in seeing the Hash like we used to with Varnish 3.
>
> Any hints?

Hello Vlad,

You are looking for the VSL mask, see man varnishd.

Dridi

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: Varnish 4.1 - "Hash" in varnishlog is.. masked [ In reply to ]
yes, these are the null character. This makes sure that
"hash("123");hash("456");" returns a different result than
"hash("1");hash("23456");"

--
Guillaume Quintard

On Tue, Feb 21, 2017 at 9:02 AM, Vlad Rusu <vlad.rusu@lola.tech> wrote:

> Are those %00 expected at the end of the Hash?
>
> ...
> - ReqURL /sites/all/themes/allegiant3/
> g4www-style/dist/styles/style.min.1.css
> ...
> - VCL_call RECV
> ...
> - VCL_call HASH
> - Hash "/sites/all/themes/allegiant3/
> g4www-style/dist/styles/style.min.1.css%00"
> - Hash "444%00"
> - Hash “www…..com%00"
>
>
> Thanks!
>
> --
> *Vlad Rusu*
> skypeid: rusu.h.vlad | cell: +40758066019 <+40%20758%20066%20019>
>
> Lola Tech | lola.tech
>
> On 21 Feb 2017, at 09:58, Vlad Rusu <vlad.rusu@lola.tech> wrote:
>
> Thanks a lot!
>
> --
> *Vlad Rusu*
> skypeid: rusu.h.vlad | cell: +40758066019 <+40%20758%20066%20019>
>
> Lola Tech | lola.tech
>
> On 21 Feb 2017, at 09:57, Geoff Simmons <geoff@uplex.de> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On 02/21/2017 08:46 AM, Vlad Rusu wrote:
>
>
> Per https://varnish-cache.org/docs/4.1/reference/vsl.html, “Hash”
> is masked by default.
>
> I am trying to use varnishlog to see the values added to the hash
> and I just can’t find a way to show it.
>
>
> Start varnishd with: -p vsl_mask=+Hash
>
> The default setting for vsl_mask is:
> - -VCL_trace,-WorkThread,-Hash,-VfpAcct
>
> Documentation here:
> https://www.varnish-cache.org/docs/4.1/reference/varnishd.html#vsl-mask
>
>
> HTH,
> Geoff
> - --
> ** * * UPLEX - Nils Goroll Systemoptimierung
>
> Scheffelstraße 32
> 22301 Hamburg
>
> Tel +49 40 2880 5731 <+49%2040%2028805731>
> Mob +49 176 636 90917 <+49%20176%2063690917>
> Fax +49 40 42949753 <+49%2040%2042949753>
>
> http://uplex.de
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQIcBAEBCAAGBQJYq/LrAAoJEOUwvh9pJNURmIkP/iVnEpxv1/h/z9Fa/h7njuOW
> vHapCbAeXpji7tD5uapWPb8a3h8vEAq1hxVPL2+eSAcrrSh4tsUaF0GaW83UTNms
> aOTecGxlF/n0HTCE/HAyKHgOD7B5dffeq1sm52UeB/mvz4GbhVg/K77tZIxNc12g
> HrtP0SXsKqYIHasE2QBryAdlkFBA7b36oyCGELnw5fpLsBqiJQ1AmjcmV71Oz6YE
> 9CkPK6e5FHRlMaKKPcbiI6upd6lGHh7SKUEOdVLI8ne4luvJQqEArvv1s6ZpHoY8
> 744M/yxnoDOyRBnr+pGSOo6Vv+HlN4+2vh8mXzgtD7PxjLjp3H9ooPbfyzcGmuPK
> i9PxuuKu6Epat+C38Y+VzPvbZeCO/S1ZvOepR7eId8Honwh/bAxfdOriqmVETfsI
> YPM+iEYWkDHvtjWwDHhkmfW6cAvWh564j2JZT0hAmY0INFpiZ5uMohId3nAUZ9/D
> FIQnEaO+67Y89nvkQZlcSB3h/D0Tu67oSuGs6JxqcND48Z1pIDsznxunl9Hly2Vw
> jzRg6a+jW/ZO/inQpA76SHhrlcEN6peakaGusHT/MrJPlLOkhzt2vGYxiusKvA2f
> ddVa6XWPjugcFLxEHgOck+QCDFBkz8Y+qVdWKEA5jHhFlc3bvmla+3zU/olEeyvk
> +q4oQ5Kg6zhVlY9bssZZ
> =22Ly
> -----END PGP SIGNATURE-----
>
>
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc@varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
Re: Varnish 4.1 - "Hash" in varnishlog is.. masked [ In reply to ]
On Tue, Feb 21, 2017 at 9:02 AM, Vlad Rusu <vlad.rusu@lola.tech> wrote:
> Are those %00 expected at the end of the Hash?
>
> ...
> - ReqURL
> /sites/all/themes/allegiant3/g4www-style/dist/styles/style.min.1.css
> ...
> - VCL_call RECV
> ...
> - VCL_call HASH
> - Hash
> "/sites/all/themes/allegiant3/g4www-style/dist/styles/style.min.1.css%00"
> - Hash "444%00"
> - Hash “www…..com%00"

Maybe null characters are part of the hash when a string is passed to
hash_data, I haven't checked...

Dridi

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: Varnish 4.1 - "Hash" in varnishlog is.. masked [ In reply to ]
--------
In message <18142121-7E0C-435A-B4BD-100AA83FE93F@lola.tech>, Vlad Rusu writes:

>Are those %00 expected at the end of the Hash?
>
>- Hash =
>"/sites/all/themes/allegiant3/g4www-style/dist/styles/style.min.1.css%00"
>- Hash "444%00"
>- Hash =E2=80=9Cwww=E2=80=A6..com%00"

Yes, they are necessary delimiters to avoid fields flowing into each
other.

Otherwise hashing ("a" and "bc") would be the same as ("ab" and "c")

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: Varnish 4.1 - "Hash" in varnishlog is.. masked [ In reply to ]
--------
In message <68074.1487670547@critter.freebsd.dk>, "Poul-Henning Kamp" writes:
>--------
>In message <18142121-7E0C-435A-B4BD-100AA83FE93F@lola.tech>, Vlad Rusu writes:
>
>>Are those %00 expected at the end of the Hash?
>>
>>- Hash =
>>"/sites/all/themes/allegiant3/g4www-style/dist/styles/style.min.1.css%00"
>>- Hash "444%00"
>>- Hash =E2=80=9Cwww=E2=80=A6..com%00"
>
>Yes, they are necessary delimiters to avoid fields flowing into each
>other.
>
>Otherwise hashing ("a" and "bc") would be the same as ("ab" and "c")

However, it can be argued that they don't need to be in varnishlog,

Martin ?

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: Varnish 4.1 - "Hash" in varnishlog is.. masked [ In reply to ]
On Tue, Feb 21, 2017 at 9:58 AM, Guillaume Quintard
<guillaume@varnish-software.com> wrote:
> yes, these are the null character. This makes sure that
> "hash("123");hash("456");" returns a different result than
> "hash("1");hash("23456");"

There goes my need to go check it, thanks!

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: Varnish 4.1 - "Hash" in varnishlog is.. masked [ In reply to ]
Of course :)

Thanks!

--
Vlad Rusu
skypeid: rusu.h.vlad | cell: +40758066019

Lola Tech | lola.tech <https://lola.tech/>
> On 21 Feb 2017, at 10:09, Guillaume Quintard <guillaume@varnish-software.com> wrote:
>
> Hello Vlad,
>
> Normally, varnish is configured using either the command line or using varnishadm. You can have a look at "varnishadm param.show vsl_mask"
>
> But we could probably have a pointer in the doc. Care to do it?
>
> --
> Guillaume Quintard