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

feat(key-auth) skip authenticating preflight OPTIONS requests #2857

Merged
merged 1 commit into from
Sep 8, 2017

Conversation

Tieske
Copy link
Member

@Tieske Tieske commented Aug 31, 2017

fixes #1292, #1535
replaces #2743

follow up PR with the migrations: #2752

@kikito kikito added pr/ready This PR is considered ready and can be merged at anytime (given it received no subsequent changes) and removed pr/status/please review labels Sep 5, 2017
@@ -52,5 +52,9 @@ return {
type = "boolean",
default = false,
},
run_on_preflight = {
type = "boolean",
default = true,
Copy link
Member

Choose a reason for hiding this comment

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

The issue with such "on by default" booleans is that they need a migration to be inserted.

Copy link
Member Author

Choose a reason for hiding this comment

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

see other comment, a follow up PR.

-- FIXME: the above `== false` test is because existing entries in the db will
-- have `nil` and hence will by default start passing the preflight request
-- This should be fixed by a migration to update the actual entries
-- in the datastore
Copy link
Member

Choose a reason for hiding this comment

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

I thought our agreed upon policy was to write migrations for such newly introduced fields instead of slowly digging ourselves into a hole of backwards-compatibility edge-cases?

Copy link
Member Author

Choose a reason for hiding this comment

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

the PR's are separated. This goes without migration, and hence can land in 0.11.x, whereas the accompanying PR with the migration, and removal of this TODO can land in 0.12. (previously discussed)

Copy link
Member

@thibaultcha thibaultcha Sep 5, 2017

Choose a reason for hiding this comment

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

There is nowhere in this PR or in the commit message a reference to that other PR you are mentioning. Could you provide a link to it? Verbose commit messages are also encouraged.

Copy link
Member Author

Choose a reason for hiding this comment

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

added to the initial message

Copy link
Contributor

Choose a reason for hiding this comment

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

removal of this TODO can land in 0.12.

It would be nice if we decided on a convention on how to tag such temporary measures in the codebase, so that we grep through the code before a new version and make sure that all of these were taken care of (something more specific than FIXME).

@thibaultcha thibaultcha merged commit 881b3f8 into master Sep 8, 2017
@thibaultcha thibaultcha deleted the fix/key-auth-preflight-options2 branch September 8, 2017 21:10
thibaultcha pushed a commit to Kong/docs.konghq.com that referenced this pull request Sep 8, 2017
Tieske added a commit that referenced this pull request Sep 12, 2017
PR #2744 and #2857 implemented the preflight options (for a minor
release). This adds the migrations including defaults (for a
major release)
Tieske added a commit that referenced this pull request Oct 5, 2017
PR #2744 and #2857 implemented the preflight options (for a minor
release). This adds the migrations including defaults (for a
major release)
thibaultcha pushed a commit that referenced this pull request Oct 5, 2017
PRs #2744 and #2857 implemented the preflight options (for a minor
release). This adds the migrations including defaults (for a
major release).

From #2883
See #2643 #1292 #1535
thibaultcha pushed a commit to Kong/docs.konghq.com that referenced this pull request Oct 19, 2017
thibaultcha pushed a commit to Kong/docs.konghq.com that referenced this pull request Oct 24, 2017
thibaultcha pushed a commit that referenced this pull request Jan 16, 2018
PRs #2744 and #2857 implemented the preflight options (for a minor
release). This adds the migrations including defaults (for a
major release).

From #2883
See #2643 #1292 #1535
thibaultcha pushed a commit that referenced this pull request Jan 19, 2018
PRs #2744 and #2857 implemented the preflight options (for a minor
release). This adds the migrations including defaults (for a
major release).

From #2883
See #2643 #1292 #1535
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/ready This PR is considered ready and can be merged at anytime (given it received no subsequent changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: key-auth plugin validating OPTIONS requests with CORS and preflight_continue=true
4 participants