Remove AllowReadOnly and ReadOnly

Signed-off-by: Nicol Draghici <idraghic@cisco.com>

Remove check and set header every time

Signed-off-by: Nicol Draghici <idraghic@cisco.com>
This commit is contained in:
Nicol Draghici
2022-07-14 18:13:46 +03:00
committed by Ramkumar Chinchani
parent a5ed99178e
commit a702a2377e
33 changed files with 509 additions and 170 deletions
+2 -8
View File
@@ -49,13 +49,6 @@ Additionally, TLS configuration can be specified with:
},
```
The registry can be deployed as a read-only service with:
```
"ReadOnly": false
},
```
## Storage
Configure storage with:
@@ -209,7 +202,8 @@ create/update/delete can not be used without 'read' action, make sure read is al
"actions": ["read", "create", "update"]
}
],
"defaultPolicy": ["read", "create"] # default policy which is applied for all users => so all users can read/create repositories
"defaultPolicy": ["read", "create"], # default policy which is applied for authenticated users, other than "charlie"=> so these users can read/create repositories
"anonymousPolicy": ["read] # anonymous policy which is applied for unauthenticated users => so they can read repositories
},
"tmp/**": { # matches all repos under tmp/ recursively
"defaultPolicy": ["read", "create", "update"] # so all users have read/create/update on all repos under tmp/ eg: tmp/infra/repo
@@ -9,25 +9,25 @@
"realm": "zot",
"accessControl": {
"**": {
"defaultPolicy": [
"anonymousPolicy": [
"read",
"create"
]
},
"tmp/**": {
"defaultPolicy": [
"anonymousPolicy": [
"read",
"create",
"update"
]
},
"infra/**": {
"defaultPolicy": [
"anonymousPolicy": [
"read"
]
},
"repos2/repo": {
"defaultPolicy": [
"anonymousPolicy": [
"read"
]
}
+1 -2
View File
@@ -5,8 +5,7 @@
},
"http": {
"address": "127.0.0.1",
"port": "8080",
"ReadOnly": false
"port": "8080"
},
"log": {
"level": "debug",
+1 -2
View File
@@ -6,8 +6,7 @@
},
"http": {
"address": "127.0.0.1",
"port": "8080",
"ReadOnly": false
"port": "8080"
},
"log": {
"level": "debug"
+1 -2
View File
@@ -27,8 +27,7 @@
"path": "test/data/htpasswd"
},
"failDelay": 5
},
"allowReadAccess": false
}
},
"log": {
"level": "debug",
-1
View File
@@ -1,7 +1,6 @@
distspecversion: 1.0.1-dev
http:
address: 127.0.0.1
allowreadaccess: false
auth:
faildelay: 5
htpasswd:
+1 -2
View File
@@ -7,8 +7,7 @@
},
"http": {
"address": "127.0.0.1",
"port": "8080",
"ReadOnly": false
"port": "8080"
},
"log": {
"level": "debug"
+2 -3
View File
@@ -5,8 +5,7 @@
},
"http": {
"address": "127.0.0.1",
"port": "8080",
"ReadOnly": false
"port": "8080"
},
"log": {
"level": "debug"
@@ -18,4 +17,4 @@
}
}
}
}
+1 -2
View File
@@ -5,8 +5,7 @@
},
"http": {
"address": "127.0.0.1",
"port": "8080",
"ReadOnly": false
"port": "8080"
},
"log": {
"level": "debug"
+1 -2
View File
@@ -21,8 +21,7 @@
},
"http": {
"address": "127.0.0.1",
"port": "5000",
"ReadOnly": false
"port": "5000"
},
"log": {
"level": "debug"
+1 -2
View File
@@ -21,8 +21,7 @@
},
"http": {
"address": "127.0.0.1",
"port": "5000",
"ReadOnly": false
"port": "5000"
},
"log": {
"level": "debug"
+1
View File
@@ -15,6 +15,7 @@
},
"accessControl": {
"**": {
"anonymousPolicy": ["read"],
"policies": [
{
"users": [
-1
View File
@@ -6,7 +6,6 @@
"http": {
"address": "127.0.0.1",
"port": "8080",
"ReadOnly": false,
"Ratelimit": {
"Rate": 10,
"Methods": [
+1 -2
View File
@@ -52,8 +52,7 @@
},
"http": {
"address": "127.0.0.1",
"port": "8080",
"ReadOnly": false
"port": "8080"
},
"log": {
"level": "debug"