Project

General

Profile

Feature #42493

Simplify Login Radosgw-admin API

Added by Manuel Rios 12 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

Hi Develops,

Actually for manage via REST API the radosgw services, we need to create a authentication like AWS with signature v2/v4 and its a pain in all scripting languages

Please simplify to a common autentification for REST RADOSGW ADMIN.

History

#1 Updated by Brad Hubbard 12 months ago

  • Project changed from Ceph to rgw
  • Category deleted (common)

#2 Updated by Konstantin Shalygin about 2 months ago

Actually it's pretty easy, on bash for example:

#!/bin/bash
s3_access_key="" 
s3_secret_key="" 
s3_host="objects-us-east-1.dream.io" 
query="admin/user" 
method="GET" 
date=$(date -R -u)
header="${method}\n\n\n${date}\n/${query}" 
sig=$(echo -en ${header} | openssl sha1 -hmac ${s3_secret_key} -binary | base64)

curl -s -H "Date: ${date}" \
-H "Authorization: AWS ${s3_access_key}:${sig}" \
-H "Host: ${s3_host}" \
-X ${method} \
"https://${s3_host}/${query}?list" | jq

Also available in: Atom PDF