Aller au contenu
NimbusNexus

Partage de réseau

Les réseaux sont normalement isolés par projet — un réseau du projet acme-prod est invisible depuis acme-staging. Le partage de réseau ouvre une brèche contrôlée dans cette isolation : vous partagez un objet qui appartient à votre projet avec un autre projet sur lequel vous détenez un rôle, et le projet destinataire peut l’utiliser comme s’il s’agissait du sien — par exemple pour attacher des VM à un réseau partagé.

POST /api/v1/rbac_policy/ effectue le partage. Il prend l’object_type (network, qos_policy, security_group, subnetpool, address_scope ou address_group), l’object_id de l’objet, une action comme access_as_shared, et le projet destinataire dans target_tenant.

Cas d’usage : un réseau de services partagés (bases de données, caches, API internes) que plusieurs projets applicatifs doivent atteindre. L’alternative consiste à exposer les services sur des IP publiques et à les sécuriser de nouveau en L7 — c’est possible, mais plus complexe que de partager le segment L2 à l’intérieur de la frontière de confiance d’un espace de travail.

Étapes suivantes

  • Réseaux — la ressource qui est partagée.
  • Projets — les propriétaires et les destinataires des objets partagés.
  • Groupes de sécurité — ce qui filtre le trafic sur un réseau partagé.

Reference

GET/api/v1/rbac_policy/

List Rbac Policies

Lists networking RBAC policies visible to the project.

Parameters

NameInTypeDescription
admin_domainquerystring | null—
admin_projectquerystring | null—
target_tenantquerystring | null—
tenant_idquerystring | null—
object_typequeryRBACObjectType | null—
object_idquerystring | null—
actionquerystring | null—
project_idquerystring | null—
idquerystring | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/rbac_policy/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/rbac_policy/

Create Rbac Policy

Creates a networking RBAC policy that shares a network resource with another project.

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
object_type*objectThe type of the object the RBAC policy applies to.
object_id*stringThe ID of the object the RBAC policy applies to.
action*"access_as_shared" | "access_as_external"The action to be enforced by the policy.
target_tenant*stringThe ID of the project to which access is granted

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/rbac_policy/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "object_type": "network",
    "object_id": "<object_id>",
    "action": "access_as_shared",
    "target_tenant": "example"
  }'
PUT/api/v1/rbac_policy/

Update Rbac Policy

Updates an existing networking RBAC policy.

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
rbac_policy_id*string—
target_tenant*stringThe new target project ID

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PUT "https://api.nimbusnexus.net/api/v1/rbac_policy/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "rbac_policy_id": "<rbac_policy_id>",
    "target_tenant": "example"
  }'
GET/api/v1/rbac_policy/artifacts

Rbac Policy Artifacts

Parameters

NameInTypeDescription
admin_domainquerystring | null—
admin_projectquerystring | null—
projectquerystring | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/rbac_policy/artifacts" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/rbac_policy/{rbac_policy_id}

Show Rbac Policy

Returns a single networking RBAC policy by ID.

Parameters

NameInTypeDescription
rbac_policy_id*pathstring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/rbac_policy/<rbac_policy_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
DELETE/api/v1/rbac_policy/{rbac_policy_id}

Delete Rbac Policy

Deletes a networking RBAC policy by ID.

Parameters

NameInTypeDescription
rbac_policy_id*pathstring—

Responses

  • 204Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/rbac_policy/<rbac_policy_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"

Need to make a real call? Try these endpoints in the live Swagger UI →