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

Ensure api managers can disable API key check on Backends #622

Closed
5 tasks
kyyberi opened this issue Nov 11, 2015 · 23 comments · Fixed by #1342
Closed
5 tasks

Ensure api managers can disable API key check on Backends #622

kyyberi opened this issue Nov 11, 2015 · 23 comments · Fixed by #1342
Assignees
Milestone

Comments

@kyyberi
Copy link

kyyberi commented Nov 11, 2015

Original report (by @kyyberi)

Even if I selected that API key is optional (and also selected unlimited requests), when testing the API response was:
API_KEY_MISSING

Definition of done (by @bajiat, by @brylie modified due to Multiproxy work)

  • Make sure the disable api key field in added to and stored in Proxy backend collection
  • Make sure the properties of the field are aligned with Api Umbrella
  • Make sure the field is passed correctly to the Admin REST API
  • Make sure it gets stored properly in API Umbrella
  • There needs to be setting in the Proxy tab in API profile

Wireframe

apikeycheck3

@kyyberi
Copy link
Author

kyyberi commented Nov 11, 2015

Works with api_key parameter though

@bajiat
Copy link
Contributor

bajiat commented Nov 19, 2015

@kyyberi To what server are you making the request? Specifically, are you making the request to Api Umbrella server? If that is the case, this is an upstream bug.

@kyyberi
Copy link
Author

kyyberi commented Nov 19, 2015

I'm using API managed by APIKA, but obviously the actual API calls go through Umbrella. In those cases, api_key is always required. References API is Lentodiilit REST API

@bajiat
Copy link
Contributor

bajiat commented Jan 12, 2016

@brylie Should we check the Edit API backend form that the data gets passed correctly?

@brylie brylie changed the title API key forced Ensure api managers can disable API key check on Backends Jan 12, 2016
@brylie
Copy link
Contributor

brylie commented Jan 12, 2016

@bajiat jep. Specifically, we need to make sure the configuration object sent to API Umbrella conforms to the REST API request requirements:

{
  "api": {
    "id": "string",
    "name": "string",
    "sort_order": 0,
    "backend_protocol": "http",
    "frontend_host": "string",
    "backend_host": "string",
    "servers": [
      {
        "id": "string",
        "host": "string",
        "port": 0
      }
    ],
    "url_matches": [
      {
        "id": "string",
        "frontend_prefix": "string",
        "backend_prefix": "string"
      }
    ],
    "balance_algorithm": "least_conn",
    "settings": {
      "id": "string",
      "append_query_string": "string",
      "headers": [
        {
          "id": "string",
          "key": "string",
          "value": "string"
        }
      ],
      "headers_string": "string",
      "default_response_headers": [
        {
          "id": "string",
          "key": "string",
          "value": "string"
        }
      ],
      "default_response_headers_string": "string",
      "override_response_headers": [
        {
          "id": "string",
          "key": "string",
          "value": "string"
        }
      ],
      "override_response_headers_string": "string",
      "http_basic_auth": "string",
      "require_https": "required_return_error",
      "require_https_transition_start_at": "2016-01-12T09:23:24.660Z",
      "disable_api_key": true,
      "api_key_verification_level": "none",
      "api_key_verification_transition_start_at": "2016-01-12T09:23:24.660Z",
      "required_roles": [
        "string"
      ],
      "required_roles_override": true,
      "allowed_ips": [
        "string"
      ],
      "allowed_referers": [
        "string"
      ],
      "rate_limit_mode": "unlimited",
      "rate_limits": [
        {
          "id": "string",
          "duration": 0,
          "accuracy": 0,
          "limit_by": "ip",
          "distributed": true,
          "response_headers": true
        }
      ],
      "anonymous_rate_limit_behavior": "ip_fallback",
      "authenticated_rate_limit_behavior": "all",
      "pass_api_key_header": true,
      "pass_api_key_query_param": true,
      "error_templates": {},
      "error_data": {},
      "error_data_yaml_strings": {}
    },
    "sub_settings": [
      {
        "id": "string",
        "http_method": "any",
        "regex": "string",
        "settings": {
          "id": "string",
          "append_query_string": "string",
          "headers": [
            {
              "id": "string",
              "key": "string",
              "value": "string"
            }
          ],
          "headers_string": "string",
          "default_response_headers": [
            {
              "id": "string",
              "key": "string",
              "value": "string"
            }
          ],
          "default_response_headers_string": "string",
          "override_response_headers": [
            {
              "id": "string",
              "key": "string",
              "value": "string"
            }
          ],
          "override_response_headers_string": "string",
          "http_basic_auth": "string",
          "require_https": "required_return_error",
          "require_https_transition_start_at": "2016-01-12T09:23:24.663Z",
          "disable_api_key": true,
          "api_key_verification_level": "none",
          "api_key_verification_transition_start_at": "2016-01-12T09:23:24.663Z",
          "required_roles": [
            "string"
          ],
          "required_roles_override": true,
          "allowed_ips": [
            "string"
          ],
          "allowed_referers": [
            "string"
          ],
          "rate_limit_mode": "unlimited",
          "rate_limits": [
            {
              "id": "string",
              "duration": 0,
              "accuracy": 0,
              "limit_by": "ip",
              "distributed": true,
              "response_headers": true
            }
          ],
          "anonymous_rate_limit_behavior": "ip_fallback",
          "authenticated_rate_limit_behavior": "all",
          "pass_api_key_header": true,
          "pass_api_key_query_param": true,
          "error_templates": {},
          "error_data": {},
          "error_data_yaml_strings": {}
        }
      }
    ],
    "rewrites": [
      {
        "id": "string",
        "matcher_type": "route",
        "http_method": "any",
        "frontend_matcher": "string",
        "backend_replacement": "string"
      }
    ],
    "created_at": "2016-01-12T09:23:24.665Z",
    "creator": {
      "username": "string"
    },
    "updated_at": "2016-01-12T09:23:24.666Z",
    "updater": {
      "username": "string"
    }
  }
}

@brylie
Copy link
Contributor

brylie commented Jan 12, 2016

I think there are two possible candidate fields in the above configuration:

...
"disable_api_key": true,
"api_key_verification_level": "none",

@kyyberi
Copy link
Author

kyyberi commented Jan 12, 2016

"disable_api_key": true is more self explanatory

@brylie
Copy link
Contributor

brylie commented Jan 13, 2016

Right, this is API Umbrella functionality though. So, we need to figure out which field(s) API Umbrella uses to control the API Key requirement.

@brylie
Copy link
Contributor

brylie commented Jan 13, 2016

As @kyyberi indicates, lets test the disable_api_key first, and issue a fix if that is the correct setting.

@brylie
Copy link
Contributor

brylie commented May 6, 2016

When submitting our Edit API Backend form, the 'disable api key' field data is not being updated on API Umbrella. We need to make sure our integration code is passing the updates to all API Backend configuration fields.
Related to issue #833

@brylie
Copy link
Contributor

brylie commented May 20, 2016

Copied from #833:

We have a field on the "Edit API Backend" form to toggle the API Key check, but the changes are not made on API Umbrella. We need to make sure our integration code is passing the updates to all API Backend configuration fields.

@bajiat bajiat added ready and removed planning labels May 23, 2016
@bajiat bajiat added this to the Sprint 23 milestone May 23, 2016
@bajiat bajiat assigned 55 and unassigned jykae May 26, 2016
@bajiat bajiat added in progress and removed ready labels May 26, 2016
@Nazarah
Copy link
Contributor

Nazarah commented Sep 1, 2016

@NNN what are your ideas about how the interface should look? please let me know.

@Nazarah
Copy link
Contributor

Nazarah commented Sep 7, 2016

@NNN : I've added the wireframes. One is the checkbox you suggested and another is toggling option. Please review them and give your feedback.
Suggestions for the text is also welcomed.

P.S. I;ve added only the field for this task only, As there might be other fields in the proxy tab, but the UI is not yet ready, you can place this field where convenient.

@55
Copy link
Contributor

55 commented Sep 7, 2016

I like with simple checkbox, let's go with it.

@55 55 added in progress and removed ready labels Sep 7, 2016
@55 55 added this to the Sprint 30 milestone Sep 9, 2016
@bajiat
Copy link
Contributor

bajiat commented Sep 14, 2016

@NNN What is the status?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants