Apache 2.4 websocket configuration


Apache 2.4 has support for websocket using proxy configuration using module mod_proxy_wstunnel.so
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so

User needs to remove # comment for  proxy related modules like

please un comment
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so

backend.server.com is backend server name

Configure proxy and passpass rules 

ProxyPass        /    ws://backend.server.com:8080/
ProxyPassReverse /    ws://backend.server.com:8080/
ProxyPass        /    wss://backend.server.com:8080/
ProxyPassReverse /    wss://backend.server.com:8080/
ProxyPass        /  http://backend.server.com:8080/
ProxyPassReverse /  http://backend.server.com:8080/


Order of this module is imported.

If modules are loaded sucessfully.  following lines are seen in Apache httpd trace log server

 [proxy:debug] [pid :tid 4] proxy_util.c(1777): AH00925: initializing worker ws://backend.server.com:8080/ shared
 [proxy:debug] [pid :tid 4] proxy_util.c(1819): AH00927: initializing worker ws://backend.server.com:8080/ local
 [proxy:debug] [pid :tid 4] proxy_util.c(1853): AH00930: initialized pool in child 916 for (backend.server.com) min=0 max=64 smax=64
 [proxy:debug] [pid :tid 4] proxy_util.c(1777): AH00925: initializing worker wss://backend.server.com:8080/ shared
 [proxy:debug] [pid :tid 4] proxy_util.c(1819): AH00927: initializing worker wss://backend.server.com:8080/ local
 [proxy:debug] [pid :tid 4] proxy_util.c(1853): AH00930: initialized pool in child 916 for (backend.server.com) min=0 max=64 smax=64
 [proxy:debug] [pid :tid 4] proxy_util.c(1777): AH00925: initializing worker http://backend.server.com:8080/ shared
 [proxy:debug] [pid :tid 4] proxy_util.c(1819): AH00927: initializing worker http://backend.server.com:8080/ local
 [proxy:debug] [pid :tid 4] proxy_util.c(1853): AH00930: initialized pool in child 916 for (backend.server.com) min=0 max=64 smax=64
 [proxy:debug] [pid :tid 4] proxy_util.c(1777): AH00925: initializing worker proxy:reverse shared
 [proxy:debug] [pid :tid 4] proxy_util.c(1819): AH00927: initializing worker proxy:reverse local

"please wait for the system Event Notification service" Solved

following are the commands I used to resolve from remote network machine

"please wait for the system Event Notification service"

Open command promt in remote machine

sc \\servername queryex SENS


Output
SERVICE_NAME: SENS
        TYPE               : 2  WIN32_SHARE_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0
        PID                :  909
        FLAGS              :


From a windows remote machine

taskkill /s \\servername /PID <pid>  /F

example:

taskkill /s \\servername /PID 909 /F

Base64 encoding vs Base64url encoding


Base 64 encoding cannot be directly used for URL encoding. In this blog, we would get in the detials for why Basse64URL encoding is needed.

Below is character set of base 64

    Value Encoding  Value Encoding  Value Encoding  Value Encoding
         0 A            17 R            34 i            51 z
         1 B            18 S            35 j            52 0
         2 C            19 T            36 k            53 1
         3 D            20 U            37 l            54 2
         4 E            21 V            38 m            55 3
         5 F            22 W            39 n            56 4
         6 G            23 X            40 o            57 5
         7 H            24 Y            41 p            58 6
         8 I            25 Z            42 q            59 7
         9 J            26 a            43 r            60 8
        10 K            27 b            44 s            61 9
        11 L            28 c            45 t            62 +
        12 M            29 d            46 u            63 /
        13 N            30 e            47 v
        14 O            31 f            48 w         (pad) =
        15 P            32 g            49 x
        16 Q            33 h            50 y


Below is character set of base64url

         "URL and Filename safe" Base 64 Alphabet

     Value Encoding  Value Encoding  Value Encoding  Value Encoding
         0 A            17 R            34 i            51 z
         1 B            18 S            35 j            52 0
         2 C            19 T            36 k            53 1
         3 D            20 U            37 l            54 2
         4 E            21 V            38 m            55 3
         5 F            22 W            39 n            56 4
         6 G            23 X            40 o            57 5
         7 H            24 Y            41 p            58 6
         8 I            25 Z            42 q            59 7
         9 J            26 a            43 r            60 8
        10 K            27 b            44 s            61 9
        11 L            28 c            45 t            62 - (minus)
        12 M            29 d            46 u            63 _
        13 N            30 e            47 v           (underline)
        14 O            31 f            48 w
        15 P            32 g            49 x
        16 Q            33 h            50 y         (pad) =

All the character set are almost the same, except last set of characters 
+, /  are present in basse 64 set.
-, _ are present in base64 url safe character set.


Take an example of sample url

http://websecurityinfo.blogspot.com/test+123 

Above is valid url and +, / have special meaning the URL. hence it makes unclear to directtly use base64 encoding in the URL or file names.


Hence in base64url character set , + and / are replaced with -,_ .

This would base encoding to be used in URL.


Usage of Base64URL :
JWT uses base64url encoding.



ws security username password


SOAP based WS Security User name password  request is two types

Password in clear text
Password in digest form

ws security username password clear text

Username and password are sent in clear text form.

 <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
   <wsse:UsernameToken wsu:Id="UsernameToken-33"><wsse:Username>testuser</wsse:Username>
   <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
   </wsse:UsernameToken>
   </wsse:Security>


ws security username password digest

Password is sent in digest form.
  <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-34">
   <wsse:Username>testuser</wsse:Username>
   <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">9Vy8Z0iXpass+NvXQ=</wsse:Password>
   <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">81GQNZ9f/3NWKyCo9n0I9w==</wsse:Nonce>
   <wsu:Created>2017-05-23T12:49:29.006Z</wsu:Created>
   </wsse:UsernameToken>
   </wsse:Security>


Password digest contains four fields.
UserName 
Password
Nonce
Creation Time Stamp.

Password Digest is calculated using combination of Password, Nonce value and TimeStamp.

Nonce is random generated number.


Password_Digest = Base64 ( SHA-1 ( nonce + created + password ) )

Example nonce 123456782017
timestamp  2017-05-23T12:49:29.006Z
password dummy

Then 
Append 1234567820172017-05-23T12:49:29.006Zdummy
Apply sha1 on appended value
then base64 will give Password Digest.


All Program menu- start menu options

To access All program menu in old way similar to xp and 2003.
please follow the below setps

Right Click on Task Bar -> naviate to Toolbars then to new toolbar

In the popup choose folder option, navigate to C:\ProgramData\Microsoft\Windows\Start Menu 

Select Programs  and say Select Folder.

This will give list of all programs in old way.


I find it saves much time then new start menus hope this helps.