nautobot / nautobot-app-chatops

Extensible ChatOps Framework to enable other chatbots and the Nautobot chat command.
https://docs.nautobot.com/projects/chatops/en/latest/
Other
51 stars 34 forks source link

Fix constance being accessed before database is ready and other fixes #341

Closed gsnider2195 closed 1 week ago

gsnider2195 commented 1 week ago

Closes #340

What's Changed

Screenshots

image

glennmatthews commented 1 week ago

I'm curious about:

Fix mattermost, msteams, slack and webex integration API views that were not requiring user to be logged in

These are the endpoints for receiving messages from the chat platform, aren't they? I wouldn't expect them to require Nautobot user authentication.

smk4664 commented 1 week ago

I'm curious about:

Fix mattermost, msteams, slack and webex integration API views that were not requiring user to be logged in

These are the endpoints for receiving messages from the chat platform, aren't they? I wouldn't expect them to require Nautobot user authentication.

Yeah, these need to be reverted. The API for these views is for the chat platform to communicate with Nautobot. Each of these views have their own way to authenticate the system. For instance, Slack signs their requests.

gsnider2195 commented 1 week ago

I'm curious about:

Fix mattermost, msteams, slack and webex integration API views that were not requiring user to be logged in

These are the endpoints for receiving messages from the chat platform, aren't they? I wouldn't expect them to require Nautobot user authentication.

Yeah, these need to be reverted. The API for these views is for the chat platform to communicate with Nautobot. Each of these views have their own way to authenticate the system. For instance, Slack signs their requests.

That's simple enough to do. I didn't have the context for why these were left wide open. These should probably also be changed to rest_framework views at some point instead of django views?

glennmatthews commented 1 week ago

I'm curious about:

Fix mattermost, msteams, slack and webex integration API views that were not requiring user to be logged in

These are the endpoints for receiving messages from the chat platform, aren't they? I wouldn't expect them to require Nautobot user authentication.

Yeah, these need to be reverted. The API for these views is for the chat platform to communicate with Nautobot. Each of these views have their own way to authenticate the system. For instance, Slack signs their requests.

That's simple enough to do. I didn't have the context for why these were left wide open. These should probably also be changed to rest_framework views at some point instead of django views?

They don't use DRF serializers AFAIK so I'm not sure why they would be changed over?

gsnider2195 commented 1 week ago

I'm curious about:

Fix mattermost, msteams, slack and webex integration API views that were not requiring user to be logged in

These are the endpoints for receiving messages from the chat platform, aren't they? I wouldn't expect them to require Nautobot user authentication.

Yeah, these need to be reverted. The API for these views is for the chat platform to communicate with Nautobot. Each of these views have their own way to authenticate the system. For instance, Slack signs their requests.

That's simple enough to do. I didn't have the context for why these were left wide open. These should probably also be changed to rest_framework views at some point instead of django views?

They don't use DRF serializers AFAIK so I'm not sure why they would be changed over?

Just so they don't have to manually disable csrf checks. This is the first place I've seen @method_decorator(csrf_exempt, name="dispatch") on an API view.