-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds "create entity" and "create entity-alias" Vault api calls. #38
Conversation
Thanks for the PR! A few things:
|
@jmgilman Please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your Pull request, and sorry for the delay.
It would be nice if you can add the complete identity secret engine, so we provide a feature complete implementation for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please name the folder identity
instead of entity
for the entity we can use separated modules like this auth
use super::responses::CreateEntityResponse; | ||
use rustify_derive::Endpoint; | ||
use std::fmt::Debug; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some Comments above your function for example.
/// ## Create Entity | |
/// This endpoint creates an entity. | |
/// | |
/// * Path: /identity/entity | |
/// * Method: POST | |
/// * Response: [CreateEntityResponse] | |
/// * Reference: https://www.vaultproject.io/api-docs/dentity/entity#create-an-entity |
pub struct CreateEntityRequest { | ||
pub name: String, | ||
pub policies: String, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a full feature set of the API documentation for the endpoint.
pub struct CreateEntityRequest { | |
pub name: String, | |
pub policies: String, | |
} | |
pub struct CreateEntityRequest { | |
pub name: String, | |
pub id: Option<String>, | |
pub metadata: Option<HashMap<String, String>>, | |
pub policies: Option<Vec<String>>, | |
pub disabled: Option<bool>, | |
} |
pub request_id: String, | ||
pub lease_id: String, | ||
pub renewable: bool, | ||
pub lease_duration: i64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lease_dorations
are always positive seconds, so we should use u64
pub lease_duration: i64, | |
pub lease_duration: u64, |
I close this issue becuase we merged #77 |
No description provided.