Skip to content

Add AuthMethod (amr) group#516

Merged
patryk merged 1 commit intocloudflare:masterfrom
Justin-Holmes:justin/add-amr-group
Aug 13, 2020
Merged

Add AuthMethod (amr) group#516
patryk merged 1 commit intocloudflare:masterfrom
Justin-Holmes:justin/add-amr-group

Conversation

@Justin-Holmes
Copy link
Copy Markdown

@Justin-Holmes Justin-Holmes commented Aug 11, 2020

Description

Access has created a new policy rule for authentication methods ("amr"). More information can be found here (as well as a list of amr values): https://tools.ietf.org/html/rfc8176. I'll have a follow-up PR in Terraform in the next day or so! Related PR: cloudflare/terraform-provider-cloudflare#762.

Has your change been tested?

Here is a cURL request showcasing the new policy rule:

curl --request PUT \
  --url https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/access/apps/<APP_ID>/policies/<POLICY_ID> \
  --header 'authorization: Bearer <AUTH_TOKEN>' \
  --header 'content-type: application/json' \
  --header 'x-auth-email: <AUTH_EMAIL>' \
  --header 'x-auth-key: <AUTH_KEY>' \
  --cookie '__cfduid=*****************
; __cflb=*************************' \
  --data '{
        "created_at": "2020-07-29T20:52:15Z",
        "decision": "allow",
        "exclude": [],
        "id": "****************************",
        "include": [
                {
                        "auth_method": {
                                "auth_method": "pwd"
                        }
                }
        ],
        "name": "Auth Method Test",
        "precedence": 1,
        "require": [],
        "uid": "*******************************",
        "updated_at": "2020-07-29T20:52:15Z"
}'
{
  "result": {
    "created_at": "2020-08-11T22:18:22Z",
    "decision": "allow",
    "exclude": [],
    "id": "***********************************",
    "include": [
      {
        "auth_method": {
          "auth_method": "pwd"
        }
      }
    ],
    "name": "Auth Method Test",
    "precedence": 1,
    "require": [],
    "uid": "***********************************",
    "updated_at": "2020-08-11T22:31:42Z"
  },
  "success": true,
  "errors": [],
  "messages": []
}

Types of changes

What sort of change does your code introduce/modify?

  • New feature (non-breaking change which adds functionality)

Copy link
Copy Markdown
Contributor

@jacobbednarz jacobbednarz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting! I'll have to have a dive into the proposal.

@patryk patryk merged commit 8e75add into cloudflare:master Aug 13, 2020
@patryk
Copy link
Copy Markdown

patryk commented Aug 13, 2020

👌

@Justin-Holmes Justin-Holmes deleted the justin/add-amr-group branch August 13, 2020 12:50
Justin-Holmes added a commit to Justin-Holmes/cloudflare-go that referenced this pull request Sep 17, 2020
Co-authored-by: Justin Holmes <jholmes@cloudflare.com>
Justin-Holmes added a commit to Justin-Holmes/cloudflare-go that referenced this pull request Sep 18, 2020
Co-authored-by: Justin Holmes <jholmes@cloudflare.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants