Skip to content

Commit

Permalink
Remove hardcoded localhost auth from relay authenticator (#1007)
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-shim authored Dec 18, 2024
1 parent 4faad4d commit f4fdd0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 2 additions & 0 deletions inabox/deploy/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ func (env *Config) generateRelayVars(ind int, graphUrl, grpcPort string) RelayVa
RELAY_ONCHAIN_STATE_REFRESH_INTERVAL: "1s",
RELAY_MAX_CONCURRENT_GET_CHUNK_OPS_CLIENT: "10",
RELAY_MAX_GET_CHUNK_BYTES_PER_SECOND_CLIENT: "100000000",
// TODO(ian-shim): set this to false once there is request signing at the relay client
RELAY_AUTHENTICATION_DISABLED: "true",
}
env.applyDefaults(&v, "RELAY", "relay", ind)

Expand Down
6 changes: 0 additions & 6 deletions relay/auth/authenticator.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"errors"
"fmt"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -107,11 +106,6 @@ func (a *requestAuthenticator) AuthenticateGetChunksRequest(
request *pb.GetChunksRequest,
now time.Time) error {

if strings.HasPrefix(origin, "127.0.0.1") {
// TODO(ian-shim): Remove this block once we have a way to authenticate requests.
return nil
}

if a.isAuthenticationStillValid(now, origin) {
// We've recently authenticated this client. Do not authenticate again for a while.
return nil
Expand Down

0 comments on commit f4fdd0a

Please sign in to comment.