ECS: Restrizione IP client CAS

Riepilogo: Questo articolo descrive la possibilità di limitare gli indirizzi IP del client che possono accedere a un bucket CAS.

Questo articolo si applica a Questo articolo non si applica a Questo articolo non è legato a un prodotto specifico. Non tutte le versioni del prodotto sono identificate in questo articolo.

Istruzioni

Introduzione:

  • La funzione può essere utilizzata quando il cliente desidera impedire agli IP client di accedere a un bucket CAS. Solo gli IP impostati nell'elenco delle restrizioni possono accedere al relativo utente. 
  • Per impostazione predefinita, non sono impostate restrizioni per un utente. 
  • La restrizione degli IP per gli utenti CAS è applicabile per l'utente su tutti i VDC.
  • Il limite predefinito di IP per utente è 10 ed è configurabile. 

Nota: Contattare il supporto remoto Dell ECS per modificare il valore predefinito del limite IP.


Procedura per configurare la restrizione IP del client CAS:

  1. Creazione di un utente CAS
  2. Creare un file di .xml con l'elenco di indirizzi IP per cui si desidera fornire l'accesso all'utente; qualsiasi altro IP che tenta di accedere all'utente CAS ha esito negativo FP_AUTHENTICATION_FAILED_ERR
  3. Utilizzare il comando PUT per impostare una restrizione IP per un particolare utente
  4. Utilizzare il comando GET Comando per ottenere o visualizzare le restrizioni impostate per un utente
  5. Per EDIT una restrizione precedentemente impostata per un utente, modificare il file xml con gli IP ed eseguire un PUT
  6. Per DELETE una restrizione impostata in precedenza, rimuovere il <ip_restrictions>127.127.127.127</ip_restrictions> dal file XML ed eseguire un PUT

File xml di esempio quando è impostata la restrizione IP: (solo questi due IP hanno accesso alla access_user utente CAS)

cat new.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user_ip_restrictions_param>
<ip_restrictions>127.127.127.127</ip_restrictions>
<ip_restrictions>127.128.128.128 </ip_restrictions>
<user_name>access_user</user_name>
</user_ip_restrictions_param>


Di seguito sono riportati i REST Comandi con PUT, GET, LISTDELETE operazioni, è necessario utilizzare un token di accesso per l'utente root.

Esempio:

admin@ecsnode1:~> TOK=$(curl -iks https://localhost:4443/login -u root:*** | grep X-SDS-AUTH-TOKEN); echo $TOK
X-SDS-AUTH-TOKEN: BAAcc1pZcEkxK3MyUU4xZy9ocEdnUXp0MHl2aTk0PQMAjAQASHVybjpzdG9yYWdlb3M6VmlydHVhbERhdGFDZW50ZXJEYXRhOjdlNWQ0YzFkLTkzNjEtNDBkNS1iMWE4LTUwNzE5NDEwODRiZQIADTE2ODQ4MjYzOTk5OTIDAC51cm46VG9rZW46ODYzMzEyZDEtYzA3NC00MWFjLThlMjAtZDUzZmQ3Njk2MjVhAgAC0A8=
admin@ecsnode1:~> 

 

Per impostare le restrizioni degli IP utente:

Utilizzare il comando riportato di seguito:
PUT /object/user-cas/ip-restrictions/{namespace_name}/{user_name}

Esempio:

curl -ks -H 'Accept:application/xml' -H 'Content-Type:application/xml' -X PUT -d @new.xml -H "$TOK" https://10.245.xx.xx:4443/object/user-cas/ip-restrictions/cas_access/access_user

Esempio 1 del corpo della risposta: (per impostazione predefinita quando non sono impostate restrizioni IP per l'utente)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user_ip_restrictions>
<user_name>access_user</user_name>
</user_ip_restrictions>

Esempio 2 del corpo della risposta: (solo l'IP client fornito di seguito ha accesso per l'utente)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user_ip_restrictions_param>
<ip_restrictions>128.128.128.128</ip_restrictions>
<ip_restrictions>127.127.127.127</ip_restrictions>
<user_name>access_user</user_name>
</user_ip_restrictions_param>

 

Per ottenere le restrizioni degli IP utente:

Utilizzare il comando riportato di seguito:
GET /object/user-cas/ip-restrictions/{namespace_name}/{user_name}

Esempio:

curl -ks -H "$TOK" -H "Content-Type: application/json" https://10.245.xx.xx:4443/object/user-cas/ip-restrictions/cas_access/access_user | xmllint -format -

Esempio di corpo della risposta: (solo l'IP client fornito di seguito ha accesso per l'utente)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user_ip_restrictions>
<ip_restrictions>127.127.127.127</ip_restrictions>
<user_name>access_user</user_name>
</user_ip_restrictions>

Esempio 2 del corpo della risposta: (GET per un utente per impostazione predefinita quando non è impostata alcuna restrizione IP)

curl -ks -H "$TOK" -H "Content-Type: application/json" https://10.245.xx.xx:4443/object/user-cas/ip-restrictions/cas_access/access_user | xmllint -format -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user_ip_restrictions>
<user_name>access_user</user_name>


Per elencare le restrizioni IP con gli utenti:

Utilizzare il comando riportato di seguito:
GET /object/user-cas/ip-restrictions/

Esempio: (elenca le restrizioni IP per ogni utente)

curl -ks -H "$TOK" -H "Content-Type: application/json" https://10.245.xx.xx:4443/object/user-cas/ip-restrictions | xmllint -format -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user_ip_restrictions_list>
<userIpRestriction>
<user_name>tsouser</user_name>
</userIpRestriction>
<userIpRestriction>
<user_name>tsouser2</user_name>
</userIpRestriction>
<userIpRestriction>
<ip_restrictions>10.245.xx.xx</ip_restrictions>
<ip_restrictions>10.247.xx.xx</ip_restrictions>
<ip_restrictions>10.245.xx.xx</ip_restrictions>
<ip_restrictions>10.247.xx.xx</ip_restrictions>
<ip_restrictions>10.243.xx.xx</ip_restrictions>
<user_name>clientuser</user_name>                >>>these are the restrictions set for this user
</userIpRestriction>
<userIpRestriction>
<user_name>gctest</user_name>
</userIpRestriction>
<userIpRestriction>
<user_name>casgcuser2</user_name>
</userIpRestriction>
<userIpRestriction>
<user_name>user2</user_name>
</userIpRestriction>
<userIpRestriction>
<user_name>gcu2</user_name>
</userIpRestriction>
<userIpRestriction>
<user_name>casgcuser1</user_name>               >>>all these users doesn't have any restrictions set 
</userIpRestriction>
</user_ip_restrictions_list>


Per eliminare le restrizioni IP impostate per un utente:

Rimuovere le voci di restrizione IP dal .xml ed eseguire una PUT

cat new.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user_ip_restrictions_param>
<user_name>clientuser</user_name>
</user_ip_restrictions_param>

Comando:

curl -ks -H 'Accept:application/xml' -H 'Content-Type:application/xml' -X PUT -d @new.xml -H "$TOK" https://10.245.130.65:4443/object/user-cas/ip-restrictions/clientns/clientuser

Esempio di corpo della risposta:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user_ip_restrictions>
<user_name>clientuser</user_name>
</user_ip_restrictions>


L'esempio seguente mostra il comportamento della funzione durante PUTGETe l'accesso a un utente con e senza restrizioni:

cat new.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user_ip_restrictions_param>
<ip_restrictions>127.127.127.127</ip_restrictions>
<user_name>access_user</user_name>
</user_ip_restrictions_param>

PUT:

curl -ks -H 'Accept:application/xml' -H 'Content-Type:application/xml' -X PUT -d @new.xml -H "$TOK" https://10.245.xx.xx:4443/object/user-cas/ip-restrictions/cas_access/access_user

GET:

curl -ks -H "$TOK" -H "Content-Type: application/json" https://10.245.xx.xx:4443/object/user-cas/ip-restrictions/cas_access/access_user | xmllint -format -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user_ip_restrictions>
<ip_restrictions>127.127.127.127</ip_restrictions>
<user_name>access_user</user_name>
</user_ip_restrictions>


Utilizzando JCASS, ha provato ad accedere al pool da 127.127.127.127 e ha potuto accedere:

CASScript>po 10.245.xx.xx?name=access_user,secret=centera@1234

Attempting to connect to: 10.245.xx.xx?name=access_user,secret=centera@1234

Connected to: 10.245.xx.xx?name=access_user,secret=centera@1234

CASPool Properties:
Connection String: 10.245.xx.xx?name=access_user,secret=centera@1234
Cluster Time: 2020.07.07 06:32:24 GMT
Buffer Size: 16384
Prefetch Buffer Size: 32768
Connection Timeout: 120000
Multi-Cluster Failover Enabled: True
Collision Avoidance Enabled: False


Si è tentato di accedere al pool da un IP non presente nell'elenco delle restrizioni IP (un elenco di indirizzi consentiti). L'accesso al pool dovrebbe avere esito negativo con il seguente errore:

CASScript>po 10.245.xx.xx?name=access_user,secret=centera@1234

Attempting to connect to: 10.245.xx.xx?name=access_user,secret=centera@1234

SDK Error Occurred:

     Error Number: -10153
     System Error: 0
     Error:        FP_AUTHENTICATION_FAILED_ERR
     Error Class:  null
     Trace:        HPPAuthCRTransaction.run<FPConnection::authenticate<Cluster.authenticate<Cluster::updateClusterInfo()<ClusterCloud::updateClusterInfo(e9f1a3c9-5cb1-3a76-a589-f639de9ad2e4)<ClusterCloud::getClusterInfo(0,ClusterInformation&,2)<FPPool::Open(10.245.130.64?name=access_user,secret=centera@1234)<_FPPool_Open(10.245.130.64?name=access_user,secret=centera@1234)<FPPool_Open8(10.245.130.64?name=access_user,secret=centera@1234)

Informazioni aggiuntive

Consultare anche la Guida all'amministrazione di ECS:
https://dl.dell.com/content/manual52394679-ecs-3-8-administration-guide.pdf?language=en-us

https://www.dell.com/support/manuals/en-us/ecs-appliance-software-with-encryption/ecs_p_adminguide_3_8/restrict-user-ip-addresses-that-can-access-a-cas-bucket?guid=guid-c4e67b45-46f8-46fa-93cf-f63795add0ad⟨=en-us

Prodotti interessati

Elastic Cloud Storage

Prodotti

ECS, ECS Appliance
Proprietà dell'articolo
Numero articolo: 000214011
Tipo di articolo: How To
Ultima modifica: 18 mag 2026
Versione:  8
Trova risposta alle tue domande dagli altri utenti Dell
Support Services
Verifica che il dispositivo sia coperto dai Servizi di supporto.