Configuring Delinea Credentials Cache on Ubuntu Linux
To configure Delinea Credentials Cache on Ubuntu Linux, you must also perform the following configuration tasks:
-
Install .NET Core on Ubuntu.
-
Set up Apache Tomcat as a proxy server.
The following sections describe how to perform these tasks.
In addition, you must also publish Delinea Credentials Cache on Linux. For detailed instructions, see Publish Delinea Credentials Cache on Linux.
Installing .NET Core on Ubuntu
Open the Ubuntu command prompt with root privileges and run the commands in the order listed below.
-
Get Ubuntu version
declare repo_version=$(if command -v lsb_release &> /dev/null; then lsb_release -r -s; else grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"'; fi)
-
Download the Microsoft signing key and repository
wget https://packages.microsoft.com/config/ubuntu/$repo_version/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
-
Install Microsoft signing key and repository
sudo dpkg -i packages-microsoft-prod.deb
-
Clean up
rm packages-microsoft-prod.deb
-
Install aspnetcore runtime 242654
sudo apt install aspnetcore-runtime-7.0
Setting Up Apache Tomcat as a Proxy Server for HTTP Websites
-
In the Ubuntu Linux command prompt, run the
sudo apt install apache2
command to install Apache Tomcat. -
Create the
Apache Tomcat
config file by running thesudo nano /etc/apache2/sites-available/credcache.conf
command. -
In the created config file, insert the data below and replace the file path and URLs if required:
Copy<VirtualHost *:80>
ServerName your-domain.com
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
</VirtualHost> -
Press Ctrl + O to write changes, press Enter, and finally, press Ctrl + X to exit.
-
Run the following command to enable the proxy and proxy_http:
-
sudo a2enmod proxy
-
sudo a2enmod proxy_http
-
sudo a2enmod SSL
-
-
Restart the Tomcat server by running the
sudo systemctl restart apache2
command.
Setting Up Apache Tomcat as a Proxy Server for HTTPS Websites
-
In the Ubuntu Linux command prompt, run the
sudo apt install apache2
command to install Apache Tomcat. -
Install OpenSSL on a Linux computer by running the following commands:
-
sudo apt-get update
-
sudo apt-get install openssl
-
-
Create an OpenSSL configuration file by running the
sudo nano /etc/ssl/openssl2.cnf
command. -
In the created configuration file, insert the following data:
Copy[req]
default_bits = 2048
default_keyfile = localhost.key
distinguished_name = req_distinguished_name
req_extensions = req_ext
x509_extensions = v3_ca
[req_distinguished_name]
countryName = Country Name (2 letter code)
countryName_default = US
stateOrProvinceName = State or Province Name (full name)
stateOrProvinceName_default = New York
localityName = Locality Name (eg, city)
localityName_default = Rochester
organizationName = Organization Name (eg, company)
organizationName_default = localhost
organizationalUnitName = organizationalunit
organizationalUnitName_default = Development
commonName = websphere-ubuntu.gamma.thycotic.com
commonName_default = websphere-ubuntu.gamma.thycotic.com
commonName_max = 64
[req_ext]
subjectAltName = @alt_names
[v3_ca]
subjectAltName = @alt_names
[alt_names]
DNS.1 = websphere-ubuntu.gamma.thycotic.com
DNS.2 = localhost
IP.1 = 10.60.12.156 -
Also, replace the valid common name, DNS name (full name of the computer
[hostname -f]
), and IP address of the Linux computer. -
Press Ctrl + O to write changes, press Enter, and finally, press Ctrl + X to exit.
-
Generate a self-signed certificate by running the following command:
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/selfsigned.key -out /etc/ssl/certs/selfsigned.crt -config /etc/ssl/openssl2.cnf
-
Generate a self-signed certificate in .pfx format by running the following command:
sudo openssl pkcs12 -export -out /etc/ssl/certs/selfsigned.pfx -inkey /etc/ssl/private/selfsigned.key -in /etc/ssl/certs/selfsigned.crt
-
Run the
sudo nano /etc/apache2/sites-available/credcache.conf
command to create theApache Tomcat
configuration file. -
In the created configuration file, insert the following data and replace the file path and URLs if required:
Copy<VirtualHost *:443>
ServerName cyb-ubuntu.prs.thycotic.com
SSLEngine on
SSLCertificateFile /etc/ssl/certs/selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/selfsigned.key
SSLProxyEngine on
ProxyPass / http://localhost:5000/
ProxyPassReverse / http://localhost:5000/
</VirtualHost> -
Press Ctrl + O to write changes, press Enter, and finally, press Ctrl + X to exit.
-
Run the following commands to enable the proxy and proxy_http:
-
sudo a2enmod proxy
-
sudo a2enmod proxy_http
-
sudo a2enmod SSL
-
-
Restart the Tomcat server by running the
sudo systemctl restart apache2
command.