Incorrect error when adding an IP access list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2023 01:11 PM
I have disabled the IP Access List on my workspace and am trying to add an IP list through the IP Access List API. However, when adding a list, I get the INVALID_STATE response.
The docs mention this is because:
"If the new list would block the calling user’s current IP, error 400 is returned with error_code value INVALID_STATE"
However, the docs also mention:
"Note that your new IP access list has no effect until you enable the feature."
So... even though I have disabled the feature, I still get the error.
This messes up our automation, as now it becomes very difficult to add access lists from scratch, unless the first list (we identified several lists) happens to include the current pipeline build agent.
I believe this is a bug.
example code:
GET {{api}}/workspace-conf?keys=enableIpAccessLists
Response:
{
"enableIpAccessLists": "false"
}
POST {{api}}/ip-access-lists
Body:
-- Any list that doesn't contain the client making the call --
Response:
{"error_code":"INVALID_STATE","message":"Your current IP **.**.**.** will not be allowed to access the workspace under current configuration"}*
- Labels:
-
IP Access List