Encrypt a HTTP authenticate password

  1. Find the HTTP Authenticate entry with the password you want to encrypt:
    authenticate.myentry.login    = "mylogin"
    authenticate.myentry.password = "mypassword"
  2. Add the certificate and its private key in the FGLPROFILE file as follows:
    security.mykey.certificate = "MyCertificate.crt"
    security.mykey.privatekey  = "MyPrivateKey.pem"
  3. Encrypt the password with fglpass:
    $ fglpass -c MyCertificate.crt
    Enter password :mypassword
    The fglpass output looks like the following:
    BASE64 BEGIN
    dBy3E5JCVxuoxsR+aOBVfp1j0SwQPt+hdjpMKriWvO2xMd5rFnFEwv+sPPd4w
    /onWviG0M5mqubBeS7QUlt/ZK0D1aO9/R5RVa5wylQu//6vxfyd8NG/
    SFJmlVH63kuyXfiVfq6bHo5+nlQZpVjSHfF2msET3S9HTpZUt4NblP4=BASE64 END
    Note: The encrypted password corresponds to the big suite of alphanumeric characters between BASE64 BEGIN and BASE64 END. The long line of text is wrapped for display purposes only.
  4. Replace the clear password with the encrypted one, and specify the key used to encrypt it (mykey in our case):
    authenticate.myentry.login = "mylogin"
    authenticate.myentry.password.mykey = "dBy3E5JCVxuoxsR+
    aOBVfp1j0SwQPt+hdjpMKriWvO2xMd5rFnFEwv+sPPd4w
    /onWviG0M5mqubBeS7QUlt/ZK0D1aO9/R5RVa5wylQu//6vxfyd8NG/
    SFJmlVH63kuyXfiVfq6bHo5+nlQZpVjSHfF2msET3S9HTpZUt4NblP4="
    Note: Do not forget to put quotes around the base64 form; otherwise the '=' character is interpreted during the loading of FGLPROFILE. The long line of text is wrapped for display purposes only.