Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google, IDMan and static api key auth #316

Closed
wants to merge 73 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
38b6bec
Changes from gitlab
nitishgoyal13 Mar 20, 2020
5fdbbe0
Changes from gitlab
nitishgoyal13 Mar 20, 2020
93b548c
Changes from gitlab
nitishgoyal13 Mar 20, 2020
27e6199
JWT Auth partial implelentations
santanusinha Mar 28, 2020
9be4294
Merge branch 'master' into simple_auth
santanusinha Mar 28, 2020
84999af
Added auth to resources
santanusinha Mar 29, 2020
c9d5d6d
Merge branch 'startup_fix' into simple_auth
santanusinha Mar 29, 2020
d2b31f7
Auth store
santanusinha Mar 29, 2020
6620022
Added api to get token
santanusinha Apr 5, 2020
4741544
Merge branch 'es-rest' into simple_auth
santanusinha Apr 7, 2020
0b4d589
Hack for consoles history
nitishgoyal13 Apr 7, 2020
0fdcde8
Merge branch 'hazelcast-kubernetes-es-rest' into es-rest
nitishgoyal13 Apr 7, 2020
6677d73
Local fix
nitishgoyal13 Apr 7, 2020
33c62fc
Working jwt header auth
santanusinha Apr 7, 2020
70324fc
Merge remote-tracking branch 'github/es-rest' into es-rest
nitishgoyal13 Apr 8, 2020
eff4911
Google auth
santanusinha Apr 8, 2020
46aff36
Merge branch 'es-rest' into simple_auth
santanusinha Apr 8, 2020
07d0c48
Refresh
santanusinha Apr 8, 2020
75ed558
Removed useless breaking dependency
santanusinha Apr 9, 2020
b5975b3
Minor cleanup
santanusinha Apr 9, 2020
1f7b125
Merge remote-tracking branch 'github/simple_auth' into google-auth
nitishgoyal13 Apr 9, 2020
aae17b1
Ability to set url scheme for swagger
santanusinha Apr 10, 2020
1b93c19
Merge remote-tracking branch 'github/simple_auth' into google-auth
nitishgoyal13 Apr 10, 2020
c6af89f
Merged docker.yml
nitishgoyal13 Apr 10, 2020
b4d7e3b
Seperated authentication and authorization in two different filters
santanusinha Apr 11, 2020
9b2aae7
Changed default session time
santanusinha Apr 11, 2020
3e7d7ba
Merge remote-tracking branch 'github/simple_auth' into google-auth
nitishgoyal13 Apr 11, 2020
09785c2
Fixed token parsing
santanusinha Apr 12, 2020
ebec7b4
Merge branch 'simple_auth' of https://github.com/Flipkart/foxtrot int…
nitishgoyal13 Apr 12, 2020
70cd3e6
Support for quotes in fql query
nitishgoyal13 Apr 23, 2020
937573b
Changes in sql parser
nitishgoyal13 Apr 23, 2020
0f6230f
Merge pull request #318 from nitishgoyal13/auth
santanusinha Apr 23, 2020
973ed73
Common filters for multi query
santanusinha May 7, 2020
994162f
Added filters cache key and enforcing no overlap
santanusinha May 8, 2020
949bbc2
Merge pull request #319 from Flipkart/common_filter
nitishgoyal13 May 8, 2020
04f69b7
Null check
santanusinha May 12, 2020
8188eeb
Merge branch 'master' into gitlab
nitishgoyal13 May 27, 2020
ee83a63
Build fix
nitishgoyal13 May 27, 2020
3cc3025
Fixed comments
nitishgoyal13 Jun 1, 2020
6438d14
Merge pull request #299 from nitishgoyal13/gitlab
santanusinha Jun 1, 2020
57f1460
Fixed conflicts
nitishgoyal13 Jun 1, 2020
545c744
Build fix
nitishgoyal13 Jun 1, 2020
197e71f
Merge pull request #323 from nitishgoyal13/auth
santanusinha Jun 1, 2020
1149c37
Updated docker file
nitishgoyal13 Jun 16, 2020
cef6fa7
fix the jar file add in dockerfine
Jul 7, 2020
ac6d366
Merge pull request #326 from jitendradhawan/docker_compose_fix
santanusinha Jul 7, 2020
b7439db
solved 2 bugs, stopRefreshInterval is not defined and url redirectio…
shashikiran-tatoju Jul 16, 2020
a55a8a2
Merge pull request #6 from shashikiran-tatoju/publicfoxtrot
nitishgoyal13 Jul 16, 2020
dc58702
removed Consolelog
shashikiran-tatoju Jul 16, 2020
46dbf7c
Merge branch 'simple_auth' of github.com:Flipkart/foxtrot into simple…
santanusinha Jul 18, 2020
26daab0
Merge branch 'master' into simple_auth
santanusinha Jul 18, 2020
49177c6
Merge pull request #7 from shashikiran-tatoju/publicfoxtrot
nitishgoyal13 Jul 22, 2020
1301cac
Merge pull request #327 from nitishgoyal13/master
santanusinha Jul 22, 2020
6cfbbed
Merge branch 'master' into simple_auth
nitishgoyal13 Jul 22, 2020
15315a4
Version update
nitishgoyal13 Jul 22, 2020
ca87638
Updates Hzelcast to use new aws service discovery
santanusinha Jul 22, 2020
c61bd9e
Merge branch 'simple_auth' into awsecs
santanusinha Jul 22, 2020
2358e47
Allowed external loading for docker file
santanusinha Jul 22, 2020
cdd0ba9
Remove ttl from table
nitishgoyal13 Jan 29, 2021
882df62
Merge pull request #329 from nitishgoyal13/table-ttl-remove
santanusinha Jan 29, 2021
b0b2a5a
Working version of polymorphic auth
santanusinha Jul 6, 2021
1182a50
Fixed bugs in logout flow
santanusinha Jul 28, 2021
a2c14e2
Fixed bugs in logout flow
santanusinha Jul 28, 2021
87ada27
Created separate configs etc for different auth modes. Made auth conf…
santanusinha Jul 28, 2021
7d0164b
Trying to gix github action
santanusinha Jul 28, 2021
39fc6b9
Added central snapshots
santanusinha Jul 28, 2021
a30d75d
Addressed review comments
santanusinha Aug 3, 2021
1291a48
Build fix
nitishgoyal13 Aug 3, 2021
1baab4d
Merge pull request #333 from nitishgoyal13/github/simple_auth
santanusinha Aug 3, 2021
229ccb8
Added more infor to README
santanusinha Jan 25, 2022
21bc94d
Merge branch 'simple_auth' of github.com:Flipkart/foxtrot into simple…
santanusinha Jan 25, 2022
ae2c7cf
Merge branch 'simple_auth' into awsecs
santanusinha Jan 25, 2022
f45f4d5
Hazelcast version bump
santanusinha Jan 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
push:
branches-ignore:
- 'master'
pull_request:
branches:
- 'master'
jobs:
test_and_package:
runs-on: ubuntu-latest
continue-on-error: false
steps:
- name: Checking out code base
uses: actions/checkout@v2

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Pull ryuk
run: docker pull quay.io/testcontainers/ryuk:0.2.2
continue-on-error: false

- name: Verification
run: mvn clean verify -Dmaven.test.failure.ignore=false
continue-on-error: false
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@
.DS_Store
target/*
config/test.yml
gauth-creds-env.sh
idman-creds-env.sh
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ MAINTAINER Santanu Sinha <santanu DOT sinha [at] gmail.com>

RUN apt-get clean && apt-get update && apt-get install -y --no-install-recommends software-properties-common
RUN add-apt-repository ppa:openjdk-r/ppa && apt-get update
RUN apt-get install -y --no-install-recommends openjdk-8-jdk ca-certificates && apt-get install -y --no-install-recommends ca-certificates-java bash curl tzdata iproute2 zip unzip wget
RUN apt-get install -y --no-install-recommends openjdk-8-jdk ca-certificates ca-certificates-java bash curl tzdata iproute2 zip unzip wget


EXPOSE 17000
Expand All @@ -12,9 +12,10 @@ EXPOSE 5701

VOLUME /var/log/foxtrot-server

ADD config/docker.yml docker.yml
ADD foxtrot-server/target/foxtrot*.jar server.jar
ADD config/docker* config/
ADD foxtrot-server/target/foxtrot-server*.jar server.jar
ADD scripts/local_es_setup.sh local_es_setup.sh
ADD startup.sh startup.sh

CMD sh -c "sleep 15 ; java -Dfile.encoding=utf-8 -XX:+${GC_ALGO-UseG1GC} -Xms${JAVA_PROCESS_MIN_HEAP-1g} -Xmx${JAVA_PROCESS_MAX_HEAP-1g} ${JAVA_OPTS} -jar server.jar server docker.yml"
CMD ./startup.sh

3 changes: 3 additions & 0 deletions GAUTH
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
280204865700-2hlhc09kfd7s5efek730pq515cn1q3p9.apps.googleusercontent.com

6dy_KawiZLdaX--SOH2xX4_y
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,15 @@ Check the [Wiki](https://github.com/Flipkart/foxtrot/wiki/Introduction) for deta

Version
----
6.3.1-9

0.1
Docker
------
Docker can be found on [DockerHub](https://hub.docker.com/layers/santanusinha/foxtrot/6.3.1-9/images/sha256-01cb327eb0353d31874681ee9ece4df8993b2152dfd3fa7279a31e3d7e32ee7e?context=explore)

Docker can be customised using environment variables. Refer [here](https://github.com/Flipkart/foxtrot/blob/simple_auth/config/docker.yml) for the variables that need to be passed.

Volume mount the config file in a docker. And pass in the full path to file `CONFIG_PATH` environment variable.

Tech
-----------
Expand Down
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BUILD_PROJECT_VERSION=6.3.1-8
BUILD_PROJECT_VERSION=6.3.1-9
89 changes: 89 additions & 0 deletions config/docker-gauth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
server:
applicationConnectors:
- type: http
port: 17000
adminConnectors:
- type: http
port: 17001

swaggerScheme: ${SWAGGER_SCHEME}

elasticsearch:
hosts:
- ${ELASTICSEARCH_HOST}
cluster: ${ELASTICSEARCH_CLUSTER_NAME}
tableNamePrefix: ${ELASTICSEARCH_TABLE_NAME_PREFIX}
port: ${ELASTICSEARCH_PORT}
connectionType: ${ELASTICSEARCH_PROTOCOL}

hbase:
secure : false
tableName: ${HBASE_TABLE_NAME}
hbaseZookeeperQuorum: ${HBASE_ZOOKEEPER_QUORUM}
hbaseZookeeperClientPort: ${HBASE_ZOOKEEPER_CLIENT_PORT}

cluster:
name: foxtrot
discovery:
type: ${DISCOVERY_TYPE}
disableMulticast: true
members: ["localhost:5701"]

cacheConfig:
maxIdleSeconds: 15
timeToLiveSeconds: 15

logging:
level: INFO
loggers:
com.flipkart.foxtrot.core.querystore.actions: DEBUG
org.apache.hadoop.hbase.zookeeper: WARN
org.apache.zookeeper: WARN
org.apache.hadoop.hbase.client: WARN
appenders:
- type: console
threshold: TRACE
timeZone: IST
logFormat: "%(%-5level) [%date] %X{TRACE-ID} [%thread] [%logger{0}]: %message%n"

cardinality:
enabled: true
batchSize: 10
active: true
interval: 86400
initialDelay: 6
maxCardinality: 20000

deletionconfig:
active: true
interval: 86400
initialdelay: 60

esIndexOptimizationConfig:
active: true
interval: 86400
initialDelay: 6

consoleHistoryConfig:
active: true
interval: 86400
initialDelay: 10

sessionCleanupConfig:
active: true
interval: 86400
initialDelay: 10

auth:
enabled: true
jwt:
issuerId: foxtrot-server
privateKey: ${PRIVATE_KEY}
sessionDuration: 15d

provider:
type: OAUTH_GOOGLE
clientId: ${GOOGLE_CLIENT_ID}
clientSecret: ${GOOGLE_CLIENT_SECRET}
server: ${GOOGLE_CALLBACK_HOST_PORT}
secureEndpoint: ${GOOGLE_SECURE_ENDPOINT}
89 changes: 89 additions & 0 deletions config/docker-idman.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
server:
applicationConnectors:
- type: http
port: 17000
adminConnectors:
- type: http
port: 17001

swaggerScheme: ${SWAGGER_SCHEME}

elasticsearch:
hosts:
- ${ELASTICSEARCH_HOST}
cluster: ${ELASTICSEARCH_CLUSTER_NAME}
tableNamePrefix: ${ELASTICSEARCH_TABLE_NAME_PREFIX}
port: ${ELASTICSEARCH_PORT}
connectionType: ${ELASTICSEARCH_PROTOCOL}

hbase:
secure : false
tableName: ${HBASE_TABLE_NAME}
hbaseZookeeperQuorum: ${HBASE_ZOOKEEPER_QUORUM}
hbaseZookeeperClientPort: ${HBASE_ZOOKEEPER_CLIENT_PORT}

cluster:
name: foxtrot
discovery:
type: ${DISCOVERY_TYPE}
disableMulticast: true
members: ["localhost:5701"]

cacheConfig:
maxIdleSeconds: 15
timeToLiveSeconds: 15

logging:
level: INFO
loggers:
com.flipkart.foxtrot.core.querystore.actions: DEBUG
org.apache.hadoop.hbase.zookeeper: WARN
org.apache.zookeeper: WARN
org.apache.hadoop.hbase.client: WARN
appenders:
- type: console
threshold: TRACE
timeZone: IST
logFormat: "%(%-5level) [%date] %X{TRACE-ID} [%thread] [%logger{0}]: %message%n"

cardinality:
enabled: true
batchSize: 10
active: true
interval: 86400
initialDelay: 6
maxCardinality: 20000

deletionconfig:
active: true
interval: 86400
initialdelay: 60

esIndexOptimizationConfig:
active: true
interval: 86400
initialDelay: 6

consoleHistoryConfig:
active: true
interval: 86400
initialDelay: 10

sessionCleanupConfig:
active: true
interval: 86400
initialDelay: 10

auth:
enabled: true
jwt:
issuerId: foxtrot-server
privateKey: ${PRIVATE_KEY}
sessionDuration: 15d

provider:
type: OAUTH_IDMAN
idmanEndpoint: ${IDMAN_ENDPOINT}
clientId: FOXTROT
clientSecret: 8f4bcf45-2909-42e0-9bba-f46351bb0e6d
serverEndpoint: "http://localhost:17000"
9 changes: 8 additions & 1 deletion config/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ server:
- type: http
port: 17001

swaggerScheme: ${SWAGGER_SCHEME}

elasticsearch:
hosts:
- ${ELASTICSEARCH_HOST}
Expand All @@ -25,7 +27,7 @@ cluster:
discovery:
type: ${DISCOVERY_TYPE}
disableMulticast: true
members: ["localhost:5701"]
members: ["${HOSTNAME}:5701"]

cacheConfig:
maxIdleSeconds: 15
Expand Down Expand Up @@ -67,3 +69,8 @@ consoleHistoryConfig:
interval: 86400
initialDelay: 10

sessionCleanupConfig:
active: true
interval: 86400
initialDelay: 10

31 changes: 29 additions & 2 deletions config/local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ hbase:
hbaseZookeeperQuorum: localhost:2181
hbaseZookeeperClientPort: 2181
seggregatedTablePrefix: foxtrot-
hbaseZookeeperZnodeParent: /hbase-unsecure
hbaseZookeeperZnodeParent: /hbase-test

cluster:
name: foxtrot
Expand Down Expand Up @@ -50,6 +50,7 @@ elasticsearchTuningConfig:
aggregationSize: 10000
scrollSize: 100
scrollTimeInSeconds: 120
documentsLimitAllowed: 10000

esIndexOptimizationConfig:
active: true
Expand All @@ -64,4 +65,30 @@ consoleHistoryConfig:
deletionconfig:
active: false
interval: 86400
initialdelay: 60
initialdelay: 60


clusterRerouteConfig:
active: false
interval: 86400
initialDelay: 10
thresholdShardCountPercentage: 10

sessionCleanupConfig:
active: true
interval: 86400
initialDelay: 10

auth:
enabled: false
jwt:
issuerId: foxtrot-server
privateKey: ${PRIVATE_KEY}
sessionDuration: 15d

provider:
type: OAUTH_GOOGLE
clientId: ${GOOGLE_CLIENT_ID}
clientSecret: ${GOOGLE_CLIENT_SECRET}
server: ${GOOGLE_CALLBACK_HOST_PORT}
secureEndpoint: false
Loading