Skip to content

feat: support more sensitive fields for encryption#11095

Merged
shreemaan-abhishek merged 15 commits into
apache:masterfrom
shreemaan-abhishek:feat/add-more
Mar 29, 2024
Merged

feat: support more sensitive fields for encryption#11095
shreemaan-abhishek merged 15 commits into
apache:masterfrom
shreemaan-abhishek:feat/add-more

Conversation

@shreemaan-abhishek

@shreemaan-abhishek shreemaan-abhishek commented Mar 27, 2024

Copy link
Copy Markdown
Contributor

Description

Some sensitive plugin fields aren't under the protection of encrypt_fields feature. It has been addressed in this PR.

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@shreemaan-abhishek
shreemaan-abhishek marked this pull request as ready for review March 27, 2024 08:02
Comment thread t/plugin/authz-casdoor.t Outdated
end

local encrypted = core.table.try_read_attr(local_conf, "apisix", "data_encryption",
"enable_encrypt_fields") and (core.config.type == "etcd")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do we need to add this ?
I think the check_schema is run before the fields encrypted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

if data encryption is enabled then the secret length will be more than 32. So we should not check the length if data encryption is on.

I think the check_schema is run before the fields encrypted.

yes. This is why we cannot use the code in plugin.lua, so I just copied the logic 😅

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if data encryption is enabled then the secret length will be more than 32.

Why the secret length will be more than 32. Is the secret is encrypted?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, exactly.

@shreemaan-abhishek
shreemaan-abhishek merged commit a7a5a2b into apache:master Mar 29, 2024
@shreemaan-abhishek
shreemaan-abhishek deleted the feat/add-more branch March 29, 2024 04:12
shreemaan-abhishek pushed a commit to shreemaan-abhishek/apisix that referenced this pull request Jan 2, 2026
membphis added a commit that referenced this pull request May 12, 2026
The `ci/check_changelog_prs.ts` script captures only the first `#NNNN`
match per line. Four entries from the previous commit listed a related
PR (or an external-repo reference like `api7/apisix-nginx-module#108`)
before the entry's own PR number, so the check reported the entries'
own PRs as missing from CHANGELOG.md. Reorder so that the entry's
canonical PR appears first on the line:

- 3.15.0 #12678 (apisix-runtime init_worker)
- 3.13.0 #12244 (server-info deprecation)
- 3.10.0 #11095 (encrypted plugin fields expansion)
- 3.8.1  #11174 (forward-auth POST headers)
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