How to enable https with DNS name provided by azure?

Uday Kiran Reddy (ureddy) 96 Reputation points
2022-03-29T07:38:39.05+00:00

We installed jenkins on azure ubuntu 21 VM.

By following this link: https://pkg.jenkins.io/debian-stable/

Instead of purchasing a custom domain we are using DNS name provided by azure directly to the VM.

Example: <custom_name>.eastus2.cloudapp.azure.com

And we are using jenkins without any issue so far.

To access the jenkins we are using:
http://<custom_name>.eastus2.cloudapp.azure.com:8080

Now, we want to integrate Azure AD login to the jenkins.

When I checked, it is mentioned that it accepts only https urls.

How to enable https using this internal azure url and provide single signon from azure AD to it.

As the jenkins is running in 8080, thought to keep nginx on the same machine and redirect all the 80 traffic to 8080. Please let us know how to manage that also so that all the 443 traffic from nginx will be transferred to http traffic to 8080 of jenkins and still SSO should work.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,035 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,773 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. deherman-MSFT 38,021 Reputation points Microsoft Employee Moderator
    2022-03-30T18:59:08.9+00:00

    @Uday Kiran Reddy (ureddy)
    I understand you are wanting to integrate Azure AD login with your VM running Jenkins. Azure AD require an https URL, so you are wondering how to enable HTTPs for you VM. Please correct me if I am missing something.

    First thing is you would need to purchase a valid SSL certificate for the domain from a trusted provider. You will then need to setup a reverse proxy for Jenkins to get HTTPS to work. Please see this thread which has a similar ask as well as their successful configuration.

    Resources:
    Tutorial: Use TLS/SSL certificates to secure a web server
    Create a fully qualified domain name for a VM in the Azure portal
    Get Started: Install Jenkins on an Azure Linux VM
    Assigning custom domain name and SSL to an Azure VM

    Hope this helps. Let me know if you run into any problems or have further questions.

    -------------------------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


  2. Md. Robayet Ferdous 1 Reputation point
    2022-10-27T20:14:00.143+00:00

    My scenario is kind of similar, but this time it's about ManageEngine ServiceDesk Plus (MSP).

    We have installed MSP on the azure windows server 2016 VM.

    Instead of purchasing a custom domain, we are using the DNS name provided by azure directly to the VM.

    Example: <custom_name>.southeastasia.cloudapp.azure.com

    We were using MSP without any issues so far. But then Microsoft decided to turn down Basic authentication for all and now we need to run with OAuth. To do so, we need to register MSP as an APP in AzureAD which accept domains with "https://" only.

    To access the MSP we are using:
    http://<custom_name>.southeastasia.cloudapp.azure.com:80

    Now, we have to integrate Azure AD login to the MSP for mail fetching service.

    How to enable HTTPS on this internal azure URL (<custom_name>.southeastasia.cloudapp.azure.com) and provide single sign-on from azure AD to it.

    Any Solution yet?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.