Enforce parameter types in internal/allowed endpoint

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

As suggested by @alejandro in gitlab-com/gl-infra/production#2985 (comment 450393373), it doesn't look like we enforce the protocol parameter in the /api/v4/internal/allowed endpoint:

https://gitlab.com/gitlab-org/gitlab/blob/88dec65c36b3131b023f56b577d0350c863b34b7/lib/api/internal/base.rb#L118-131

I propose:

  1. Add some soft parameter checking and flag warnings we see the parameters deviate from the expected type.
  2. When we convince ourselves there are no issues, add Grape parameter validations to enforce these requirements.
Edited by 🤖 GitLab Bot 🤖