Barbican returns a 400 when unable to find a plugin.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Barbican |
Fix Released
|
Medium
|
Juan Antonio Osorio Robles |
Bug Description
I found this bug while testing the client against a Barbican instance that has stored secrets using different plugins. The scenario is this:
Barbican is running with a particular SecreStore plugin, let's call it PluginA. Then the secret store plugin is changed to a new plugin, let's call it PluginB.
The Barbican database contains secrets that were either encrypted with PluginA or PluginB.
When a client attempts to retrieve a secret that was stored using PluginA, Barbican responds with "400 - could not find plugin" since the only plugin available is PluginB.
The problem I see with this is that 400 errors imply that the client is in error, and that the request must somehow be changed so that the service can fulfill the request. This is not the case in this scenario, though, because there is nothing the client can do to their request to get their secret back.
Since this error is the result of a misconfiguration (leaving PluginA out of the config), or possibly due to a failed PluginA -> PluginB migration, I would expect the response to be a 500 (or 5xx) error, since the service itself must be modified to be able to fulfill the request.
Changed in barbican: | |
assignee: | nobody → Juan Antonio Osorio Robles (juan-osorio-robles) |
Changed in barbican: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in barbican: | |
milestone: | none → kilo-3 |
Changed in barbican: | |
status: | Fix Committed → Fix Released |
Changed in barbican: | |
milestone: | kilo-3 → 2015.1.0 |
IMHO, agreed!