-
Notifications
You must be signed in to change notification settings - Fork 280
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
Error code 403 over remote event update using only local tags #1125
Comments
If you have a 403 error, it’s a perm issue and not really an issue with PyMISP. |
Based on the provided information, I can safely deduce it's DNS. It's always DNS. |
I've completed my issue, sorry for the delay :) |
It seems to be related to those issues: MISP/MISP#4691 & MISP/MISP#4925 |
I thought so too but since MISP allowed me in GUI to edit local tags I thought this was more of a MISP <-> PyMISP interaction @Rafiot EDIT: For now i've found a workaround, the script's user is site admin : that's the only way to bypass this issue. |
@minisephirot no, it doesn't. But it is going to be a MISP API issue, I don't think there is a fix on PyMISP side. cc @iglocska |
@Rafiot Thank you for the feedback. Should I close this issue and reopen it on MISP's repo or let someone transfer it ? |
If it works as site admin, it is definitely a perm issue. Can you check the tag settings and make sure it is not limited to a specific user/org and you're trying to add it from another one? |
What do you mean by tag settings ? |
Okay, I looked at the first message again and it's a different issue: the exception happens when you call an update on the MISP event, which would makes sense if you do that against an event that isn't yours. If I'm not mistaken (please correct me @iglocska), you can attach a local tag to a MISP event that isn't yours if you do something like that: |
Hello, thank you for the insight. |
Context
What: I enrich external organisation events using local tags to ensure that my semantic is not beeing propagated
Why: Those tags are used to pivot on if the IOC should enter a blacklist or not.
Code
How:
Sadly I've been using a site admin user to do this stuff while POCing so yeah.. I was able to pretty free in term of perms.
This leads me to using a more appropriated role wich was sync user, thinking that local tags wouldn't be a bother since it was described as "The long awaited feature “local tags” is now finally available. You can create tags locally if you are a member of the given MISP instance’s host organisation, enabling “in-place” tagging for synchronisation and export filtering"
Alas when running the script I get thoses:
ERROR: Something went wrong (403): {'saved': False, 'name': 'Could not edit Event', 'message': 'Could not edit Event', 'url': '/events/edit/9085', 'errors': 'Event could not be saved: The user used to edit the event is not authorised to do so. This can be caused by the user not being of the same organisation as the original creator of the event whilst also not being a site administrator.', 'id': '9085'}
Event 9085 "as is":
With local tags added on GUI:
There is probably something i've missed while considering local tags: if this is an issue of not beeing in the same organisation why can I add those tags on the same event as a same role user from another organisation on GUI ?
Sorry for the delayed issue by the way I tried to bruteforce my way beforehand to not waste your time if this was just a perm issue..
The text was updated successfully, but these errors were encountered: