diff options
Diffstat (limited to 'proto/repository.proto')
-rw-r--r-- | proto/repository.proto | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/proto/repository.proto b/proto/repository.proto index fc3221c46..f4128ae05 100644 --- a/proto/repository.proto +++ b/proto/repository.proto @@ -672,8 +672,9 @@ message CreateRepositoryFromURLRequest { string url = 2; // HttpHost is the hostname of the remote repository. Use this when the // URL hostname has already been resolved to an IP address to prevent DNS - // rebinding. - string http_host = 3; + // rebinding. This is deprecated as we will be using resolved_address + // going forward. + string http_host = 3 [deprecated=true]; // http_authorization_header is the HTTP header which can be added to // the request in order to authenticate against the repository. string http_authorization_header = 4; @@ -683,6 +684,13 @@ message CreateRepositoryFromURLRequest { // repository. If set to `true`, create a complete mirror-clone which maps all // remote references into the local repository. bool mirror = 5; + // ResolvedAddress holds the resolved IP address of the remote_url. This is + // used to avoid DNS rebinding by mapping the url to the resolved address. + // Only IPv4 dotted decimal ("192.0.2.1"), IPv6 ("2001:db8::68"), or IPv4-mapped + // IPv6 ("::ffff:192.0.2.1") forms are supported. + // Works with HTTP/HTTPS/Git/SSH protocols. + // Optional. + string resolved_address = 6; } // This comment is left unintentionally blank. @@ -825,8 +833,16 @@ message CreateRepositoryFromSnapshotRequest { string http_auth = 3; // HttpHost is the hostname of the remote snapshot. Use this when the // URL hostname has already been resolved to an IP address to prevent DNS - // rebinding. - string http_host = 4; + // rebinding. This is deprecated as we will be using resolved_address + // going forward. + string http_host = 4 [deprecated=true]; + // ResolvedAddress holds the resolved IP address of the remote_url. This is + // used to avoid DNS rebinding by mapping the url to the resolved address. + // Only IPv4 dotted decimal ("192.0.2.1"), IPv6 ("2001:db8::68"), or IPv4-mapped + // IPv6 ("::ffff:192.0.2.1") forms are supported. + // Works with HTTP/HTTPS protocols. + // Optional. + string resolved_address = 5; } // This comment is left unintentionally blank. @@ -961,8 +977,15 @@ message Remote { repeated string mirror_refmaps = 4; // HttpHost is the hostname of the remote repository. Use this when the // URL hostname has already been resolved to an IP address to prevent DNS - // rebinding. - string http_host = 5; + // rebinding. This is deprecated as this field is/was never used. + string http_host = 5 [deprecated=true]; + // ResolvedAddress holds the resolved IP address of the remote_url. This is + // used to avoid DNS rebinding by mapping the url to the resolved address. + // Only IPv4 dotted decimal ("192.0.2.1"), IPv6 ("2001:db8::68"), or IPv4-mapped + // IPv6 ("::ffff:192.0.2.1") forms are supported. + // Works with HTTP/HTTPS/Git/SSH protocols. + // Optional. + string resolved_address = 6; // Previously, it was possible to specify a remote name. This was quite a // dangerous field to set though: the name was simply used to create an ad-hoc |