public function setSecurity($security)
	{
		if (!is_object($security)) {
			throw new InvalidArgumentException("Security should be an object");
		}
		$dbname = $this->client->getDatabaseName();
		$raw = $this->client->query(
				"PUT", "/" . $dbname . "/_security", array(), json_encode($security)
		);
		$resp = Couch::parseRawResponse($raw);
		if ($resp['status_code'] == 200) {
			return $resp['body'];
		}
		throw new CouchException($raw);
	}