Azure / Azure/azure-functions-host

Function masterKey doesn't give access to keys API

Open
#3,378 2 comments 1 reaction 1 assignee Claimed by @paulbatum View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 10h
Merged PRs (30d)
36

Description

I want to read and update Azure Function host keys via the http API on Kudu/SCM.

I can read the "master key" using

GET functionname.scm.azurewebsites.net/api/functions/admin/masterKey
with Basic authentication using the publishing profile credentials.

That key does not give me access to the [key management API][1].

Requests such as

GET functionname.azurewebsites.net/admin/host/keys?code=

fail with code 401.

This works in some functions we have, but not in others. It doesn't seem to be a functions v1 vs v2 issue. A v2 function in our dev environment doesn't work, while the same function in our test environment works.

I've tried deleting host.json from ``D:\home\data\functions\secrets``. It's been recreated, and the key I get back from the SCM ``masterKey`` URL above is the new key from that file, but it still doesn't work. I've also tried restarting the function app.

[1]: https://github.com/Azure/azure-functions-host/wiki/Key-management-API

#### Investigative information
- Timestamp: 2018-09-04 06:23:15.354
- Function App version (1.0 or 2.0-beta): 2.0-beta
- Invocation ID: c8c47b2a-ef10-444d-b352-a9acc2c7990e)
- Region: North Europe

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.