Documentation
¶
Overview ¶
Package http implements the MinIO Admin API v3 compatibility layer (prefix /minio/admin/v3/).
This package is NOT related to the MinIO data importer in minio/import/. Its sole purpose is to expose a subset of the MinIO Admin API so that standard MinIO clients (mc, madmin-go) can manage DirIO's IAM objects — users, groups, policies, and service accounts — without any client-side changes.
The handlers delegate entirely to the DirIO service layer via service.ServicesFactory; there is no MinIO code in this path.
Relationship to other packages:
- minio/import — one-time data importer from legacy MinIO installations
- minio/middleware — detects MinIO SDK User-Agent and injects compat headers
- internal/http/server/dirioapi — DirIO-native REST API (/.dirio/api/v1/)
Index ¶
- func RegisterRouter(r *teapot.Router, h RouteHandlers)
- type CannedPolicyHandlers
- type GroupHTTPService
- func (s *GroupHTTPService) GetGroupInfo(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s *GroupHTTPService) ListGroups(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s *GroupHTTPService) SetGroupStatus(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s *GroupHTTPService) UpdateGroupMembers(w nethttp.ResponseWriter, r *nethttp.Request)
- type GroupHandlers
- type Handler
- func (h *Handler) HandleAddCannedPolicy() http.Handler
- func (h *Handler) HandleAddServiceAccount() http.Handler
- func (h *Handler) HandleAddUser() http.Handler
- func (h *Handler) HandleCannedPolicyInfo() http.Handler
- func (h *Handler) HandleDeleteServiceAccount() http.Handler
- func (h *Handler) HandleGroupInfo() http.Handler
- func (h *Handler) HandleHealth() http.Handler
- func (h *Handler) HandleInfo() http.Handler
- func (h *Handler) HandleListCannedPolicies() http.Handler
- func (h *Handler) HandleListGroups() http.Handler
- func (h *Handler) HandleListServiceAccounts() http.Handler
- func (h *Handler) HandleListUsers() http.Handler
- func (h *Handler) HandleRemoveCannedPolicy() http.Handler
- func (h *Handler) HandleRemoveUser() http.Handler
- func (h *Handler) HandleServiceAccountInfo() http.Handler
- func (h *Handler) HandleSetGroupStatus() http.Handler
- func (h *Handler) HandleSetPolicy() http.Handler
- func (h *Handler) HandleSetUserStatus() http.Handler
- func (h *Handler) HandleUpdateGroupMembers() http.Handler
- func (h *Handler) HandleUpdateServiceAccount() http.Handler
- func (h *Handler) HandleUserInfo() http.Handler
- func (h *Handler) HandlerDetachPolicy() http.Handler
- func (h *Handler) HandlerListPolicyEntities() http.Handler
- type HealthHandlers
- type PolicyHTTPService
- func (s PolicyHTTPService) AddCannedPolicy(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s PolicyHTTPService) DetachPolicy(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s PolicyHTTPService) InfoCannedPolicy(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s PolicyHTTPService) ListCannedPolicies(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s PolicyHTTPService) PolicyEntitiesList(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s PolicyHTTPService) RemoveCannedPolicy(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s PolicyHTTPService) SetPolicy(w nethttp.ResponseWriter, r *nethttp.Request)
- type PolicyHandlers
- type RouteHandlers
- type ServiceAccountHTTPService
- func (s *ServiceAccountHTTPService) AddServiceAccount(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s *ServiceAccountHTTPService) DeleteServiceAccount(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s *ServiceAccountHTTPService) InfoServiceAccount(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s *ServiceAccountHTTPService) ListServiceAccounts(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s *ServiceAccountHTTPService) UpdateServiceAccount(w nethttp.ResponseWriter, r *nethttp.Request)
- type ServiceAccountHandlers
- type UserHTTPService
- func (s *UserHTTPService) CreateUser(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s *UserHTTPService) InfoUser(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s *UserHTTPService) ListUsers(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s *UserHTTPService) RemoveUser(w nethttp.ResponseWriter, r *nethttp.Request)
- func (s *UserHTTPService) SetUserStatus(w nethttp.ResponseWriter, r *nethttp.Request)
- type UserHandlers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRouter ¶
func RegisterRouter(r *teapot.Router, h RouteHandlers)
RegisterRouter registers all MinIO Admin API v3 routes on r. When h is nil, routes are registered with nil handlers (for CLI route listing).
Types ¶
type CannedPolicyHandlers ¶
type GroupHTTPService ¶
type GroupHTTPService struct {
// contains filtered or unexported fields
}
func (*GroupHTTPService) GetGroupInfo ¶
func (s *GroupHTTPService) GetGroupInfo(w nethttp.ResponseWriter, r *nethttp.Request)
GetGroupInfo handles GET /minio/admin/v3/group?name=... Returns group info including members (as access keys) and attached policies.
func (*GroupHTTPService) ListGroups ¶
func (s *GroupHTTPService) ListGroups(w nethttp.ResponseWriter, r *nethttp.Request)
ListGroups handles GET /minio/admin/v3/groups Returns a JSON array of group names.
func (*GroupHTTPService) SetGroupStatus ¶
func (s *GroupHTTPService) SetGroupStatus(w nethttp.ResponseWriter, r *nethttp.Request)
SetGroupStatus handles POST /minio/admin/v3/set-group-status?group=...&status=enabled|disabled
func (*GroupHTTPService) UpdateGroupMembers ¶
func (s *GroupHTTPService) UpdateGroupMembers(w nethttp.ResponseWriter, r *nethttp.Request)
UpdateGroupMembers handles POST /minio/admin/v3/update-group-members Body JSON: {"group":"...", "members":["alice","bob"], "isRemove":false} Members are access key strings; they are resolved to UUIDs internally. When isRemove=false: creates group if not exists, adds members. When isRemove=true: removes members from group.
type GroupHandlers ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles MinIO Admin API v3 IAM requests
func New ¶
func New(serviceFactory *service.ServicesFactory) *Handler
func (*Handler) HandleAddCannedPolicy ¶
func (*Handler) HandleAddServiceAccount ¶
func (*Handler) HandleAddUser ¶
func (*Handler) HandleCannedPolicyInfo ¶
func (*Handler) HandleDeleteServiceAccount ¶
func (*Handler) HandleGroupInfo ¶
func (*Handler) HandleHealth ¶
func (*Handler) HandleInfo ¶
func (*Handler) HandleListCannedPolicies ¶
func (*Handler) HandleListGroups ¶
func (*Handler) HandleListServiceAccounts ¶
func (*Handler) HandleListUsers ¶
func (*Handler) HandleRemoveCannedPolicy ¶
func (*Handler) HandleRemoveUser ¶
func (*Handler) HandleServiceAccountInfo ¶
func (*Handler) HandleSetGroupStatus ¶
func (*Handler) HandleSetPolicy ¶
func (*Handler) HandleSetUserStatus ¶
func (*Handler) HandleUpdateGroupMembers ¶
func (*Handler) HandleUpdateServiceAccount ¶
func (*Handler) HandleUserInfo ¶
func (*Handler) HandlerDetachPolicy ¶
func (*Handler) HandlerListPolicyEntities ¶
type HealthHandlers ¶
type PolicyHTTPService ¶
type PolicyHTTPService struct {
// contains filtered or unexported fields
}
func (PolicyHTTPService) AddCannedPolicy ¶
func (s PolicyHTTPService) AddCannedPolicy(w nethttp.ResponseWriter, r *nethttp.Request)
func (PolicyHTTPService) DetachPolicy ¶
func (s PolicyHTTPService) DetachPolicy(w nethttp.ResponseWriter, r *nethttp.Request)
func (PolicyHTTPService) InfoCannedPolicy ¶
func (s PolicyHTTPService) InfoCannedPolicy(w nethttp.ResponseWriter, r *nethttp.Request)
func (PolicyHTTPService) ListCannedPolicies ¶
func (s PolicyHTTPService) ListCannedPolicies(w nethttp.ResponseWriter, r *nethttp.Request)
func (PolicyHTTPService) PolicyEntitiesList ¶
func (s PolicyHTTPService) PolicyEntitiesList(w nethttp.ResponseWriter, r *nethttp.Request)
func (PolicyHTTPService) RemoveCannedPolicy ¶
func (s PolicyHTTPService) RemoveCannedPolicy(w nethttp.ResponseWriter, r *nethttp.Request)
func (PolicyHTTPService) SetPolicy ¶
func (s PolicyHTTPService) SetPolicy(w nethttp.ResponseWriter, r *nethttp.Request)
type PolicyHandlers ¶
type RouteHandlers ¶
type RouteHandlers interface {
CannedPolicyHandlers
GroupHandlers
HealthHandlers
PolicyHandlers
ServiceAccountHandlers
UserHandlers
}
type ServiceAccountHTTPService ¶
type ServiceAccountHTTPService struct {
// contains filtered or unexported fields
}
func (*ServiceAccountHTTPService) AddServiceAccount ¶
func (s *ServiceAccountHTTPService) AddServiceAccount(w nethttp.ResponseWriter, r *nethttp.Request)
AddServiceAccount handles PUT /minio/admin/v3/add-service-account Request body: madmin-encrypted AddServiceAccountReq JSON. Response: madmin-encrypted {"credentials": {"accessKey":"...","secretKey":"...",...}}
func (*ServiceAccountHTTPService) DeleteServiceAccount ¶
func (s *ServiceAccountHTTPService) DeleteServiceAccount(w nethttp.ResponseWriter, r *nethttp.Request)
DeleteServiceAccount handles DELETE /minio/admin/v3/delete-service-account?accessKey=...
func (*ServiceAccountHTTPService) InfoServiceAccount ¶
func (s *ServiceAccountHTTPService) InfoServiceAccount(w nethttp.ResponseWriter, r *nethttp.Request)
InfoServiceAccount handles GET /minio/admin/v3/info-service-account?accessKey=... madmin expects an encrypted InfoServiceAccountResp.
func (*ServiceAccountHTTPService) ListServiceAccounts ¶
func (s *ServiceAccountHTTPService) ListServiceAccounts(w nethttp.ResponseWriter, r *nethttp.Request)
ListServiceAccounts handles GET /minio/admin/v3/list-service-accounts madmin expects an encrypted response containing {"accounts": [ServiceAccountInfo, ...]}
func (*ServiceAccountHTTPService) UpdateServiceAccount ¶
func (s *ServiceAccountHTTPService) UpdateServiceAccount(w nethttp.ResponseWriter, r *nethttp.Request)
UpdateServiceAccount handles POST /minio/admin/v3/update-service-account?accessKey=... Body is madmin-encrypted UpdateServiceAccountReq JSON. Returns 204 No Content on success (as madmin expects).
type ServiceAccountHandlers ¶
type UserHTTPService ¶
type UserHTTPService struct {
// contains filtered or unexported fields
}
func (*UserHTTPService) CreateUser ¶
func (s *UserHTTPService) CreateUser(w nethttp.ResponseWriter, r *nethttp.Request)
func (*UserHTTPService) InfoUser ¶
func (s *UserHTTPService) InfoUser(w nethttp.ResponseWriter, r *nethttp.Request)
func (*UserHTTPService) ListUsers ¶
func (s *UserHTTPService) ListUsers(w nethttp.ResponseWriter, r *nethttp.Request)
func (*UserHTTPService) RemoveUser ¶
func (s *UserHTTPService) RemoveUser(w nethttp.ResponseWriter, r *nethttp.Request)
func (*UserHTTPService) SetUserStatus ¶
func (s *UserHTTPService) SetUserStatus(w nethttp.ResponseWriter, r *nethttp.Request)