summaryrefslogtreecommitdiff
path: root/ovsdb/trigger.c
Commit message (Collapse)AuthorAgeFilesLines
* ovsdb: add support for role-based access controlsLance Richardson2017-06-081-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add suport for ovsdb RBAC (role-based access control). This includes: - Support for "RBAC_Role" table. A db schema containing a table by this name will enable role-based access controls using this table for RBAC role configuration. The "RBAC_Role" table has one row per role, with each row having a "name" column (role name) and a "permissions" column (map of table name to UUID of row in separate permission table.) The permission table has one row per access control configuration, with the following columns: "name" - name of table to which this row applies "authorization" - set of column names and column:key pairs to be compared against client ID to determine authorization status "insert_delete" - boolean, true if insertions and authorized deletions are allowed. "update" - Set of columns and column:key pairs for which authorized updates are allowed. - Support for a new "role" column in the remote configuration table. - Logic for applying the RBAC role and permission tables, in combination with session role from the remote connection table and client id, to determine whether operations modifying database contents should be permitted. - Support for specifying RBAC role string as a command-line option to ovsdb-tool (Ben Pfaff). Signed-off-by: Lance Richardson <lrichard@redhat.com> Co-authored-by: Ben Pfaff <blp@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Make OVSDB backup sever read onlyAndy Zhou2016-08-141-2/+5
| | | | | | | | | | | | | When ovsdb-sever is running in the backup state, it would be nice to make sure there is no un-intended changes to the backup database. This patch makes the ovsdb server only accepts 'read' transactions as a backup server. When the server role is changed into an active server, all existing client connections will be reset. After reconnect, all clinet transactions will then be accepted. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* json: Move from lib to include/openvswitch.Terry Wilson2016-07-221-1/+1
| | | | | | | | | | | | | | | To easily allow both in- and out-of-tree building of the Python wrapper for the OVS JSON parser (e.g. w/ pip), move json.h to include/openvswitch. This also requires moving lib/{hmap,shash}.h. Both hmap.h and shash.h were #include-ing "util.h" even though the headers themselves did not use anything from there, but rather from include/openvswitch/util.h. Fixing that required including util.h in several C files mostly due to OVS_NOT_REACHED and things like xmalloc. Signed-off-by: Terry Wilson <twilson@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* list: Rename all functions in list.h with ovs_ prefix.Ben Warren2016-03-301-4/+4
| | | | | | | This attempts to prevent namespace collisions with other list libraries Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Replace most uses of assert by ovs_assert.Ben Pfaff2013-01-161-2/+1
| | | | | | | | This is a straight search-and-replace, except that I also removed #include <assert.h> from each file where there were no assert calls left. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
* ovsdb-server: Add support for multiple databases.Ben Pfaff2012-09-241-4/+5
| | | | | | | | | | The OVSDB protocol has supported multiple databases for a long time, but the ovsdb-server implementation only supported one database at a time. This commit adds support for multiple databases. Feature #12353. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
* Global replace of Nicira Networks.Raju Subramanian2012-05-021-1/+1
| | | | | | | | Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc. Feature #10593 Signed-off-by: Raju Subramanian <rsubramanian@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* ovsdb: Implement a "lock" feature in the database protocol.Ben Pfaff2011-07-261-2/+2
| | | | | | | | | | | This provides clients a way to coordinate their access to the database. This is a voluntary, not mandatory, locking protocols, that is, clients are not prevented from modifying the database unless they cooperate with the locking protocol. It is also not related to any of the ACID properties of database transactions. It is strictly a way for clients to coordinate among themselves. The following commit will introduce one user.
* ovsdb: Refactor jsonrpc-server to make the concept of a session public.Ben Pfaff2011-07-261-14/+14
| | | | | | | An upcoming commit will need to expose the concept of a database session to the execution engine, to allow the execution engine to query the locks held by the session. This commit prepares for that by making sessions a publicly visible data structure.
* Switch many macros from using CONTAINER_OF to using OBJECT_CONTAINING.Ben Pfaff2010-10-011-2/+2
| | | | | These macros require one fewer argument by switching, which makes code that uses them shorter and more readable.
* poll-loop: New function poll_timer_wait_until().Ben Pfaff2010-05-261-1/+1
| | | | | Many of poll_timer_wait()'s callers actually want to wait until a specific time, so it's convenient for them to offer a function that does this.
* poll-loop: Change poll_timer_wait() parameter from "int" to "long long".Ben Pfaff2010-05-261-2/+2
| | | | | | | | | | | | | | | Every so often I get concerned because OVS does most of its time arithmetic in "long long int" but poll_timer_wait() takes an "int", so there is potential for truncating a large value to a small value or a positive value to a negative value. That would cause excessive wakeups and possibly 100% CPU usage. This commit therefore changes poll_timer_wait()'s parameter type from "int" to "long long int". The file-scope 'timeout' variable remains type "int" because that is the type of poll()'s timeout argument. Factoring poll_timer_wait() into two functions is not necessary here but it comes in handy in the following patch.
* Initial implementation of OVSDB.Ben Pfaff2009-11-041-0/+129