Skip to content

[16.0][BKP] endpoint_auth_api_key: expect 401 when API key is missing - #156

Merged
OCA-git-bot merged 2 commits into
OCA:16.0from
camptocamp:16.0-fix-endpoint_auth_api_key
Aug 20, 2026
Merged

[16.0][BKP] endpoint_auth_api_key: expect 401 when API key is missing#156
OCA-git-bot merged 2 commits into
OCA:16.0from
camptocamp:16.0-fix-endpoint_auth_api_key

Conversation

@yankinmax

Copy link
Copy Markdown
Contributor

The auth_api_key authentication handler now raises Unauthorized: 401 for missing credentials. Update the stale assertion accordingly while retaining 403 for authenticated API keys that lack endpoint permission.

The `auth_api_key` authentication handler now raises `Unauthorized`: 401 for missing credentials.
Update the stale assertion accordingly while retaining `403` for authenticated API keys that lack endpoint permission.
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @simahawk,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added mod:endpoint_auth_api_key Module endpoint_auth_api_key series:16.0 labels Aug 19, 2026
@yankinmax

Copy link
Copy Markdown
Contributor Author

The pre-commit error is:

Generate default setup.py for an addons directory........................Failed
- hook id: setuptools-odoo-make-default
- exit code: 1

Traceback (most recent call last):
  File "/home/runner/.cache/pre-commit/repo3necct15/py_env-python3/bin/setuptools-odoo-make-default", line 3, in <module>
    from setuptools_odoo.make_default_setup import main
  File "/home/runner/.cache/pre-commit/repo3necct15/py_env-python3/lib/python3.11/site-packages/setuptools_odoo/__init__.py", line 6, in <module>
    from .core import get_addon_metadata
  File "/home/runner/.cache/pre-commit/repo3necct15/py_env-python3/lib/python3.11/site-packages/setuptools_odoo/core.py", line 15, in <module>
    from . import base_addons, external_dependencies
  File "/home/runner/.cache/pre-commit/repo3necct15/py_env-python3/lib/python3.11/site-packages/setuptools_odoo/base_addons.py", line 8, in <module>
    from pkg_resources import resource_string
ModuleNotFoundError: No module named 'pkg_resources'

@yankinmax

Copy link
Copy Markdown
Contributor Author

Hello @OCA/web-maintainers can you pls take a look and possibly trigger merge?

@StefanRijnhart StefanRijnhart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! References: OCA/server-auth#738, #106

@StefanRijnhart

Copy link
Copy Markdown
Member

Pre-commit fixed in #157

@yankinmax

Copy link
Copy Markdown
Contributor Author

Hello @ivantodorovich can you pls take a look?

@StefanRijnhart

Copy link
Copy Markdown
Member

fast tracking as a CI fixing backport

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-156-by-StefanRijnhart-bump-patch, awaiting test results.

@StefanRijnhart

Copy link
Copy Markdown
Member

oh right, this is going to fail. Would you mind cherry-picking #157?

@OCA-git-bot

Copy link
Copy Markdown
Contributor

@StefanRijnhart your merge command was aborted due to failed check(s), which you can inspect on this commit of 16.0-ocabot-merge-pr-156-by-StefanRijnhart-bump-patch.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@yankinmax

Copy link
Copy Markdown
Contributor Author

oh right, this is going to fail. Would you mind cherry-picking #157?

Done, thx!

@StefanRijnhart

Copy link
Copy Markdown
Member

Great, thanks!

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-156-by-StefanRijnhart-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit 09e592d into OCA:16.0 Aug 20, 2026
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 6dba965. Thanks a lot for contributing to OCA. ❤️

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants