Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom deny attributes to access application #566

Merged

Conversation

Justin-Holmes
Copy link

Description

This PR adds support for custom deny attributes on Access applications.

Has your change been tested?

Example curl request:

curl --request PUT \
  --url https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/access/apps/<APP_ID> \
  --header 'authorization: Bearer <TOKEN>' \
  --header 'x-auth-email: <EMAIL>' \
  --header 'x-auth-key: <AUTH_KEY>'
  --data '{
        "aud": <REDACTED>,
        "cors_headers": {
                "allow_all_headers": true,
                "allow_all_methods": true,
                "allow_all_origins": true
        },
        "created_at": "2020-10-14T21:52:27Z",
        "domain": <REDACTED>,
        "name": "test app",
        "policies": [],
        "allowed_idps": [],
        "auto_redirect_to_identity": false,
        "session_duration": "1m",
        "custom_deny_url": "https://www.cloudflare.com",
        "custom_deny_message": "asdf"
}'
{
  "result": {
    "aud": <REDACTED>,
    "cors_headers": {
      "allow_all_headers": true,
      "allow_all_methods": true,
      "allow_all_origins": true
    },
    "created_at": "2020-10-14T21:52:27Z",
    "domain": <REDACTED>,
    "name": "test app",
    "policies": [],
    "allowed_idps": [],
    "auto_redirect_to_identity": false,
    "session_duration": "1m",
    "updated_at": "2020-12-16T20:07:11Z",
    "custom_deny_message": "asdf",
    "custom_deny_url": "https://www.cloudflare.com",
    "type": "self_hosted"
  },
  "success": true,
  "errors": [],
  "messages": []
}

The Cloudflare API docs will be updated with these new fields shortly.

Copy link
Member

@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.

woo! this was something I've been looking for too! 🙏

@patryk patryk merged commit 74f8b63 into cloudflare:master Dec 30, 2020
@Justin-Holmes Justin-Holmes deleted the justin/access_custom_deny_fields branch January 4, 2021 15:51
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