storj/certificate/authorization/authorizations_test.go

282 lines
33 KiB
Go
Raw Permalink Normal View History

2019-01-24 20:15:10 +00:00
// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
package authorization
import (
"net"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"storj.io/common/base58"
"storj.io/common/identity"
"storj.io/common/identity/testidentity"
"storj.io/common/peertls/tlsopts"
"storj.io/common/rpc"
"storj.io/common/storj"
"storj.io/common/testcontext"
"storj.io/storj/certificate/certificateclient"
"storj.io/storj/certificate/certificatepb"
)
2018-12-31 15:45:43 +00:00
var (
t1 = Token{
UserID: "user@mail.test",
2018-12-31 15:45:43 +00:00
Data: [tokenDataLength]byte{1, 2, 3},
}
t2 = Token{
UserID: "user2@mail.test",
2018-12-31 15:45:43 +00:00
Data: [tokenDataLength]byte{4, 5, 6},
}
)
func TestNewAuthorization(t *testing.T) {
userID := "user@mail.test"
2018-12-31 15:45:43 +00:00
auth, err := NewAuthorization(userID)
require.NoError(t, err)
require.NotNil(t, auth)
assert.NotZero(t, auth.Token)
2018-12-31 15:45:43 +00:00
assert.Equal(t, userID, auth.Token.UserID)
assert.NotEmpty(t, auth.Token.Data)
}
func TestAuthorizations_MarshalUnmarshal(t *testing.T) {
expectedAuths := Group{
{Token: t1},
{Token: t2},
}
authsBytes, err := expectedAuths.Marshal()
2019-04-08 19:15:19 +01:00
require.NoError(t, err)
require.NotEmpty(t, authsBytes)
var actualAuths Group
err = actualAuths.Unmarshal(authsBytes)
assert.NoError(t, err)
assert.NotNil(t, actualAuths)
assert.Equal(t, expectedAuths, actualAuths)
}
func TestAuthorizations_Group(t *testing.T) {
auths := make(Group, 10)
for i := 0; i < 10; i++ {
if i%2 == 0 {
auths[i] = &Authorization{
Token: t1,
Claim: &Claim{
Timestamp: time.Now().Unix(),
},
}
} else {
auths[i] = &Authorization{
Token: t2,
}
}
}
claimed, open := auths.GroupByClaimed()
for _, a := range claimed {
assert.NotNil(t, a.Claim)
}
for _, a := range open {
assert.Nil(t, a.Claim)
}
}
2018-12-31 15:45:43 +00:00
func TestParseToken_Valid(t *testing.T) {
userID := "user@mail.test"
2018-12-31 15:45:43 +00:00
data := [tokenDataLength]byte{1, 2, 3}
cases := []struct {
testID string
userID string
}{
{
"valid token",
userID,
},
{
"multiple delimiters",
"us" + tokenDelimiter + "er@mail.test",
2018-12-31 15:45:43 +00:00
},
}
for _, c := range cases {
testCase := c
t.Run(testCase.testID, func(t *testing.T) {
2018-12-31 15:45:43 +00:00
b58Data := base58.CheckEncode(data[:], tokenVersion)
tokenString := testCase.userID + tokenDelimiter + b58Data
2018-12-31 15:45:43 +00:00
token, err := ParseToken(tokenString)
require.NoError(t, err)
require.NotNil(t, token)
2018-12-31 15:45:43 +00:00
assert.Equal(t, testCase.userID, token.UserID)
2018-12-31 15:45:43 +00:00
assert.Equal(t, data[:], token.Data[:])
})
}
}
func TestParseToken_Invalid(t *testing.T) {
userID := "user@mail.test"
2018-12-31 15:45:43 +00:00
data := [tokenDataLength]byte{1, 2, 3}
cases := []struct {
testID string
tokenString string
}{
{
"no delimiter",
userID + base58.CheckEncode(data[:], tokenVersion),
},
{
"missing userID",
tokenDelimiter + base58.CheckEncode(data[:], tokenVersion),
},
{
"not enough data",
userID + tokenDelimiter + base58.CheckEncode(data[:len(data)-10], tokenVersion),
},
{
"too much data",
userID + tokenDelimiter + base58.CheckEncode(append(data[:], []byte{0, 0, 0}...), tokenVersion),
},
{
"data checksum or format error",
2018-12-31 15:45:43 +00:00
userID + tokenDelimiter + base58.CheckEncode(data[:], tokenVersion)[:len(base58.CheckEncode(data[:], tokenVersion))-4] + "0000",
},
}
for _, c := range cases {
testCase := c
t.Run(testCase.testID, func(t *testing.T) {
token, err := ParseToken(testCase.tokenString)
2018-12-31 15:45:43 +00:00
assert.Nil(t, token)
assert.True(t, ErrInvalidToken.Has(err))
})
}
}
func TestGroup_MarshalUnmarshal(t *testing.T) {
ctx := testcontext.New(t)
ecdsaPeer, err := identity.DecodePeerIdentity(ctx, ecdsaPeerIdentity)
require.NoError(t, err)
ecdsaPeer.RestChain = nil
rsaPeer, err := identity.DecodePeerIdentity(ctx, rsaPeerIdentity)
require.NoError(t, err)
rsaPeer.RestChain = nil
group := Group{
&Authorization{
Token: Token{
UserID: "ecdsaPeer",
Data: [tokenDataLength]byte{1, 2, 3, 4, 5, 6},
},
Claim: &Claim{
Addr: "ecdsaPeer",
Timestamp: 100000000,
Identity: ecdsaPeer,
SignedChainBytes: [][]byte{
[]byte("alpha"),
[]byte("beta"),
},
},
},
&Authorization{
Token: Token{
UserID: "rsaPeer",
Data: [tokenDataLength]byte{6, 5, 4, 3, 2, 1},
},
Claim: &Claim{
Addr: "rsaPeer",
Timestamp: 200000000,
Identity: rsaPeer,
SignedChainBytes: [][]byte{
[]byte("gamma"),
[]byte("delta"),
},
},
},
}
current, err := group.Marshal()
require.NoError(t, err)
require.Equal(t, expectedGroupData, current)
var second Group
err = second.Unmarshal(current)
require.NoError(t, err)
require.Equal(t, group, second)
}
func TestToken_Equal(t *testing.T) {
assert.True(t, t1.Equal(&t1))
assert.False(t, t1.Equal(&t2))
}
func TestNewClient(t *testing.T) {
t.Skip("needs proper rpc listener to work")
ctx := testcontext.New(t)
defer ctx.Cleanup()
ident, err := testidentity.PregeneratedIdentity(0, storj.LatestIDVersion())
require.NoError(t, err)
require.NotNil(t, ident)
listener, err := net.Listen("tcp", "127.0.0.1:0")
require.NoError(t, err)
require.NotNil(t, listener)
defer ctx.Check(listener.Close)
ctx.Go(func() error {
for {
conn, err := listener.Accept()
if err != nil {
return nil //nolint: nilerr // ignore closing error
}
if err := conn.Close(); err != nil {
return err
}
}
})
tlsOptions, err := tlsopts.NewOptions(ident, tlsopts.Config{}, nil)
require.NoError(t, err)
Add Versioning Server (#1576) * Initial Webserver Draft for Version Controlling * Rename type to avoid confusion * Move Function Calls into Version Package * Fix Linting and Language Typos * Fix Linting and Spelling Mistakes * Include Copyright * Include Copyright * Adjust Version-Control Server to return list of Versions * Linting * Improve Request Handling and Readability * Add Configuration File Option Add Systemd Service file * Add Logging to File * Smaller Changes * Add Semantic Versioning and refuses outdated Software from Startup (#1612) * implements internal Semantic Version library * adds version logging + reporting to process * Advance SemVer struct for easier handling * Add Accepted Version Store * Fix Function * Restructure * Type Conversion * Handle Version String properly * Add Note about array index * Set temporary Default Version * Add Copyright * Adding Version to Dashboard * Adding Version Info Log * Renaming and adding CheckerProcess * Iteration Sync * Iteration V2 * linting * made LogAndReportVersion a go routine * Refactor to Go Routine * Add Context to Go Routine and allow Operation if Lookup to Control Server fails * Handle Unmarshal properly * Linting * Relocate Version Checks * Relocating Version Check and specified default Version for now * Linting Error Prevention * Refuse Startup on outdated Version * Add Startup Check Function * Straighten Logging * Dont force Shutdown if --dev flag is set * Create full Service/Peer Structure for ControlServer * Linting * Straighting Naming * Finish VersionControl Service Layout * Improve Error Handling * Change Listening Address * Move Checker Function * Remove VersionControl Peer * Linting * Linting * Create VersionClient Service * Renaming * Add Version Client to Peer Definitions * Linting and Renaming * Linting * Remove Transport Checks for now * Move to Client Side Flag * Remove check * Linting * Transport Client Version Intro * Adding Version Client to Transport Client * Add missing parameter * Adding Version Check, to set Allowed = true * Set Default to true, testing * Restructuring Code * Uplink Changes * Add more proper Defaults * Renaming of Version struct * Dont pass Service use Pointer * Set Defaults for Versioning Checks * Put HTTP Server in go routine * Add Versioncontrol to Storj-Sim * Testplanet Fixes * Linting * Add Error Handling and new Server Struct * Move Lock slightly * Reduce Race Potentials * Remove unnecessary files * Linting * Add Proper Transport Handling * small fixes * add fence for allowed check * Add Startup Version Check and Service Naming * make errormessage private * Add Comments about VersionedClient * Linting * Remove Checks that refuse outgoing connections * Remove release cmd * Add Release Script * Linting * Update to use correct Values * Move vars private and set minimum default versions for testing builds * Remove VersionedClient * Better Error Handling and naked return removal * Straighten the Regex and string conversion * Change Check to allows testplanet and storj-sim to run without the need to pass an LDFlag * Cosmetic Change to Dashboard * Cleanup Returns and remove commented code * Remove Version Check if no build options are passed in * Pass in Config Values instead of Pointers * Handle missed Error * Update Endpoint URL * Change Type of Release Flag * Add additional Logging * Remove Versions Logging of other Services * minor fixes Change-Id: I5cc04a410ea6b2008d14dffd63eb5f36dd348a8b
2019-04-03 20:13:39 +01:00
dialer := rpc.NewDefaultDialer(tlsOptions)
t.Run("Basic", func(t *testing.T) {
client, err := certificateclient.New(ctx, dialer, listener.Addr().String())
assert.NoError(t, err)
assert.NotNil(t, client)
defer ctx.Check(client.Close)
})
t.Run("ClientFrom", func(t *testing.T) {
conn, err := dialer.DialAddressInsecure(ctx, listener.Addr().String())
require.NoError(t, err)
require.NotNil(t, conn)
defer ctx.Check(conn.Close)
client := certificateclient.NewClientFrom(certificatepb.NewDRPCCertificatesClient(conn))
assert.NoError(t, err)
assert.NotNil(t, client)
defer ctx.Check(client.Close)
})
}
var (
ecdsaPeerIdentity = []byte{0x30, 0x82, 0x1, 0x61, 0x30, 0x82, 0x1, 0x7, 0xa0, 0x3, 0x2, 0x1, 0x2, 0x2, 0x10, 0x9, 0x75, 0x21, 0x49, 0x60, 0x7e, 0xeb, 0xc6, 0x87, 0x14, 0x65, 0xdf, 0xc9, 0x86, 0xb0, 0x8b, 0x30, 0xa, 0x6, 0x8, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x4, 0x3, 0x2, 0x30, 0x10, 0x31, 0xe, 0x30, 0xc, 0x6, 0x3, 0x55, 0x4, 0xa, 0x13, 0x5, 0x53, 0x74, 0x6f, 0x72, 0x6a, 0x30, 0x22, 0x18, 0xf, 0x30, 0x30, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0xf, 0x30, 0x30, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x10, 0x31, 0xe, 0x30, 0xc, 0x6, 0x3, 0x55, 0x4, 0xa, 0x13, 0x5, 0x53, 0x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0x2a, 0xa4, 0x12, 0x76, 0x1, 0x67, 0xe4, 0x18, 0x6e, 0xcf, 0xe6, 0xa7, 0x84, 0x23, 0x71, 0x36, 0xac, 0x2, 0x20, 0x5e, 0xf0, 0x38, 0x72, 0xa4, 0x92, 0x7, 0x3e, 0x3b, 0xc2, 0x4e, 0x6e, 0x62, 0xff, 0x7c, 0x99, 0x49, 0x36, 0xae, 0x98, 0x2, 0xef, 0x53, 0xc5, 0xa2, 0xf4, 0x1a, 0x4f, 0x4b, 0x19, 0xe1, 0xab, 0x30, 0x82, 0x1, 0x70, 0x30, 0x82, 0x1, 0x16, 0xa0, 0x3, 0x2, 0x1, 0x2, 0x2, 0x11, 0x0, 0x8f, 0xd, 0xe8, 0xb9, 0x27, 0x2, 0x25, 0xd2, 0x89, 0x26, 0xde, 0x5, 0xe3, 0x87, 0xe, 0xff, 0x30, 0xa, 0x6, 0x8, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x4, 0x3, 0x2, 0x30, 0x10, 0x31, 0xe, 0x30, 0xc, 0x6, 0x3, 0x55, 0x4, 0xa, 0x13, 0x5, 0x53, 0x74, 0x6f, 0x72, 0x6a, 0x30, 0x22, 0x18, 0xf, 0x30, 0x30, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0xf, 0x30, 0x30, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x10, 0x31, 0xe, 0x30, 0xc, 0x6, 0x3, 0x55, 0x4, 0xa, 0x13, 0x5, 0x53, 0x74, 0x6f, 0x72, 0x6a, 0x30, 0x59, 0x30, 0x13, 0x6, 0x7, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x2, 0x1, 0x6, 0x8, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x3, 0x1, 0x7, 0x3, 0x42, 0x0, 0x4, 0x6a, 0xd9, 0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x2, 0x21, 0x0, 0xa9, 0x48, 0xfc, 0xf2, 0x55, 0x55, 0x8a, 0x64, 0x58, 0x7d, 0xd2, 0x98, 0x97, 0x87, 0x
rsaPeerIdentity = []byte{0x30, 0x82, 0x2, 0xee, 0x30, 0x82, 0x1, 0xd6, 0xa0, 0x3, 0x2, 0x1, 0x2, 0x2, 0x11, 0x0, 0xfb, 0xae, 0x82, 0x98, 0xf8, 0x1, 0x67, 0x40, 0xdb, 0x5b, 0xb9, 0x78, 0x25, 0x90, 0xb6, 0x13, 0x30, 0xd, 0x6, 0x9, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0xd, 0x1, 0x1, 0xb, 0x5, 0x0, 0x30, 0x10, 0x31, 0xe, 0x30, 0xc, 0x6, 0x3, 0x55, 0x4, 0xa, 0x13, 0x5, 0x53, 0x74, 0x6f, 0x72, 0x6a, 0x30, 0x22, 0x18, 0xf, 0x30, 0x30, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0xf, 0x30, 0x30, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x10, 0x31, 0xe, 0x30, 0xc, 0x6, 0x3, 0x55, 0x4, 0xa, 0x13, 0x5, 0x53, 0x74, 0x6f, 0x72, 0x6a, 0x30, 0x82, 0x1, 0x22, 0x30, 0xd, 0x6, 0x9, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0xd, 0x1, 0x1, 0x1, 0x5, 0x0, 0x3, 0x82, 0x1, 0xf, 0x0, 0x30, 0x82, 0x1, 0xa, 0x2, 0x82, 0x1, 0x1, 0x0, 0xc0, 0x51, 0x6f, 0x29, 0xb8, 0xda, 0x97, 0x4a, 0x93, 0x2e, 0x50, 0x66, 0x69, 0xa1, 0x9b, 0x20, 0x9e, 0xf4, 0x28, 0xeb, 0x3b, 0xe6, 0x67, 0xab, 0x82, 0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f0, 0x38, 0x72, 0xa4, 0x92, 0x7, 0x3e, 0x3b, 0xc2, 0x4e, 0x6e, 0x62, 0xff, 0x7c, 0x99, 0x49, 0x36, 0xae, 0x98, 0x2, 0xef, 0x53, 0xc5, 0xa2, 0xf4, 0x1a, 0x4f, 0x4b, 0x19, 0xe1, 0xab, 0x30, 0x82, 0x1, 0x70, 0x30, 0x82, 0x1, 0x16, 0xa0, 0x3, 0x2, 0x1, 0x2, 0x2, 0x11, 0x0, 0x8f, 0xd, 0xe8, 0xb9, 0x27, 0x2, 0x25, 0xd2, 0x89, 0x26, 0xde, 0x5, 0xe3, 0x87, 0xe, 0xff, 0x30, 0xa, 0x6, 0x8, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x4, 0x3, 0x2, 0x30, 0x10, 0x31, 0xe, 0x30, 0xc, 0x6, 0x3, 0x55, 0x4, 0xa, 0x13, 0x5, 0x53, 0x74, 0x6f, 0x72, 0x6a, 0x30, 0x22, 0x18, 0xf, 0x30, 0x30, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0xf, 0x30, 0x30, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x10, 0x31, 0xe, 0x30, 0xc, 0x6, 0x3, 0x55, 0x4, 0xa, 0x13, 0x5, 0x53, 0x74, 0x6f, 0x72, 0x6a, 0x30, 0x59, 0x30, 0x13, 0x6, 0x7, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x2, 0x1, 0x6, 0x8, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x3, 0x1, 0x7, 0x3, 0x42, 0x0, 0x4, 0x6a, 0xd9, 0x11, 0xb9, 0x57, 0x89, 0x29, 0x0, 0xf3, 0x58, 0x8c, 0x14, 0xc1, 0x36, 0x66, 0x10, 0x9f, 0xde, 0xf2, 0xaa, 0x54, 0x28, 0xde,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