Java Function App using incoming Client Certificate to authenticate user with Function App execution
page_type: sample languages:
- java products:
- function app description: "Java Function App using incoming Client Certificate to authenticate user with Function App execution" urlFragment: "update-this-to-unique-url-stub"
This repository shows a sample Java Function App using incoming Client Certificate to authenticate user with Function App execution.
Outline the file contents of the repository.
File/folder | Description |
---|---|
src/ |
Java application source folder |
.gitignore |
Define what to ignore at commit time. |
README.md |
This README file. |
LICENSE |
The license for the sample. |
You should have the following development tools installed on your local machine.
- Azure Functions
- VS Code
- Maven (optional)
You will also need accounts for the following services
Before deploying to App Service, build and run the Function locally.
mvn clean package
mvn azure-functions:run
Open a browser to http://localhost:7071/api/auth and should display 401 - UNAUTHORIZED, which is normal because we are not making the call with calls with certificate.
Now that the Function App works locally, we will push the jar to our registry so our Function App can run the jar. First, run the below command to be login into Azure Cli and deploy to a specific Function App.
az login
mvn azure-functions:deploy
Once your Function App is deployed, you can now just simply enable Incoming Client Certificate on Azure so incoming requests are challeneged.