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

No authentication logging for transport API endpoints #232

Open
jw35 opened this issue Nov 2, 2018 · 0 comments
Open

No authentication logging for transport API endpoints #232

jw35 opened this issue Nov 2, 2018 · 0 comments
Labels

Comments

@jw35
Copy link
Collaborator

jw35 commented Nov 2, 2018

The parking, aq and zone API endpoints are all implemented as class-based views inheriting from auth.AuthenticateddAPIView(). This in turn inherits from the standard APIView() to enforce authn/authz and extends the initial() method to log the path, user and token name for each authentication. This way we can tell who is doing what with the API.

But the Transport API either uses function-based views with decorators to enforce authn/authz, or class-based views based on generics.ListAPIView and generics.RetrieveAPIView with assignments to authentication_classes, permission_classes, etc. This works fine, but we don't get the logging.

I can't immediately see how to adapt what we have to include logging. @abrahammartin do you have any ideas?

@jw35 jw35 added the API label Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant