Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

Commit

Permalink
add security & related configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
huangwei5 committed Sep 26, 2018
1 parent 8250dff commit 215cd26
Show file tree
Hide file tree
Showing 44 changed files with 2,159 additions and 134 deletions.
10 changes: 10 additions & 0 deletions configuration/jaas.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
client {
com.sun.security.auth.module.Krb5LoginModule required
debug=true
useTicketCache=true
useKeyTab=true
keyTab="/etc/xxx.keytab"
renewTGT=true
principal="[email protected]"
storeKey=true;
};
6 changes: 6 additions & 0 deletions configuration/pegasus.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ async_workers = 4
enable_perf_counter = false
perf_counter_tags = cluster=onebox,app=unit_test
push_counter_interval_secs = 10
open_auth = true
jaas_conf = configuration/jaas.conf
#要访问的server的用户名
service_name = xxx
#要访问的server的fqdn
service_fqdn = xxx
3 changes: 2 additions & 1 deletion idl/recompile_thrift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ rm -rf $TMP_DIR

mkdir -p $TMP_DIR
$thrift --gen java rrdb.thrift
$thrift --gen java replication.thrift
$thrift --gen java replication.thrift
$thrift --gen java security.thrift

# as we pack the thrift source in our project, so we need to replace the package name
find $TMP_DIR -name "*.java" | xargs sed -i -e "s/org.apache.thrift/com.xiaomi.infra.pegasus.thrift/g"
Expand Down
55 changes: 55 additions & 0 deletions idl/security.thrift
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
include "base.thrift"

namespace cpp dsn.apps
namespace java com.xiaomi.infra.pegasus.apps
namespace py pypegasus.rrdb

// negotiation process:
//
// client server
// | --- SASL_MECH --> |
// | <-- SASL_MECH --- |
// | - SASL_SEL_MECH ->|
// | <- SASL_SEL_OK ---|
// | |
// | --- SASL_INIT --> |
// | |
// | <-- SASL_CHAL --- |
// | --- SASL_RESP --> |
// | |
// | ..... |
// | |
// | <-- SASL_CHAL --- |
// | --- SASL_RESP --> |
// | | (authentication will succeed
// | | if all chanllenges passed)
// | <-- SASL_SUCC --- |
// (client won't response | |
// if servers says ok) | |
// | --- RPC_CALL ---> |
// | <-- RPC_RESP ---- |

enum negotiation_status
{
INVALID = 0,
SASL_LIST_MECHANISMS,
SASL_LIST_MECHANISMS_RESP,
SASL_SELECT_MECHANISMS,
SASL_SELECT_MECHANISMS_OK,
SASL_INITIATE,
SASL_CHALLENGE,
SASL_RESPONSE,
SASL_SUCC,
SASL_AUTH_FAIL
}

struct negotiation_message
{
1: negotiation_status status;
2: base.blob msg;
}

service security
{
negotiation_message negotiate(1:negotiation_message nego_msg);
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/main/java/com/xiaomi/infra/pegasus/apps/key_value.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/main/java/com/xiaomi/infra/pegasus/apps/meta.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/main/java/com/xiaomi/infra/pegasus/apps/mutate.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 215cd26

Please sign in to comment.