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

Develop #88

Closed
wants to merge 54 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
f2d456b
Ifix master data service (#19)
pintu-eGov Aug 17, 2021
e08e80a
Ifix master patch (#20)
pintu-eGov Aug 18, 2021
1fa6c54
Update CODEOWNERS
nikesh2812 Aug 18, 2021
a94ca17
Ifix seed data (#21)
rahu-eGov Aug 19, 2021
7ebd307
ifix services common (#23)
rushang7 Aug 23, 2021
e262fde
Create .gitignore (#24)
GhanshyamRawat-eGov Aug 23, 2021
ee3dabf
Fiscal event post processor (#28)
pintu-eGov Aug 25, 2021
7d15f8c
Fiscal event service (#29)
pintu-eGov Aug 25, 2021
b46659d
Ifix zuul (#30)
pintu-eGov Aug 25, 2021
30a315f
Keycloak (#31)
pintu-eGov Aug 25, 2021
20e3ce1
Build config for department entity service (#34)
rushang7 Aug 25, 2021
f6a32b0
Convert enum to all caps (#36)
pintu-eGov Aug 26, 2021
537475b
Rahu 310 (#38)
rahu-eGov Aug 27, 2021
49e6f85
Refactored: responseInfo -> responseHeader (#39)
pintu-eGov Aug 27, 2021
179f2da
Pk department entity post processor (#40)
pintu-eGov Aug 27, 2021
544d7d7
Updated Druid ingestion config (#41)
pintu-eGov Aug 30, 2021
41dabb7
IFIX-320: EAT index refactor (#44)
rahu-eGov Aug 31, 2021
27b0de0
Ifix department entity service (#45)
rahu-eGov Aug 31, 2021
3b46cc0
IFIX-320: New indexes for for fiscal event (#43)
rahu-eGov Aug 31, 2021
8afc373
IFIX-371 : fiscal event search api (#47)
pintu-eGov Aug 31, 2021
a869bd5
Jmeter test plan for fiscal-event-service (#48)
rahu-eGov Sep 1, 2021
6c1e7b7
Updated README file (#49)
rahu-eGov Sep 1, 2021
d954343
Migration file rename (#50)
rahu-eGov Sep 1, 2021
2371d54
Update INSTRUCTIONS.md (#51)
pintu-eGov Sep 1, 2021
60e7f4f
Pk ifix 319 (#52)
rahu-eGov Sep 2, 2021
a041ac7
Changed primary timestamp in druid config (#53)
pintu-eGov Sep 2, 2021
be0ad8c
Ifix 379 (#54)
rahu-eGov Sep 3, 2021
f7a75c1
Ifix 387 (#55)
rahu-eGov Sep 3, 2021
7e117c6
Druid config (#56)
pintu-eGov Sep 4, 2021
8987f7e
documentation link and postman collection (#57)
pintu-eGov Sep 6, 2021
bf6167c
Doc add (#58)
pintu-eGov Sep 6, 2021
b7263db
Postman collection and API redocly link (#59)
rahu-eGov Sep 6, 2021
261767b
Ifix 386 (#60)
pintu-eGov Sep 6, 2021
d00ea74
Add ps link (#61)
rahu-eGov Sep 7, 2021
8ee00d2
Bug fix regarding refactor (#62)
rahu-eGov Sep 7, 2021
566fdfe
Null check for corrupted project data (#63)
pintu-eGov Sep 7, 2021
3c10113
Department Entity check at fiscal event push (#64)
rahu-eGov Sep 7, 2021
a4a62cd
Bug fix department entity check while fetching from department entity…
rahu-eGov Sep 7, 2021
6c38581
Kafka consumer lag issue (#67)
pintu-eGov Sep 8, 2021
14ba7c1
Department entity children fix (#69)
rahu-eGov Sep 8, 2021
3e585e7
Hierarchy level zero addition (#70)
rahu-eGov Sep 8, 2021
99f5901
Corrected collection name of fiscal event (#72)
pintu-eGov Sep 9, 2021
10e681a
Updated the readme doc (#71)
pintu-eGov Sep 9, 2021
89f2702
Corrected collection name (#73)
pintu-eGov Sep 9, 2021
0864eba
Update FiscalEventValidator.java (#74)
pintu-eGov Sep 9, 2021
2bdf8d0
CoaId null fix (#75)
pintu-eGov Sep 9, 2021
cad83fb
Added utilities
Sep 15, 2021
a9ec3ec
fiscal event id fix in search api (#76)
pintu-eGov Sep 15, 2021
b36d27f
bug fix (#80)
pintu-eGov Sep 16, 2021
7c4ccad
Rahu mongo ck (#81)
rahu-eGov Sep 21, 2021
e58065c
Rahu index fix (#82)
rahu-eGov Sep 22, 2021
64907dd
Resolve merge conflicts when merge Develop to master (#84)
rushang7 Sep 23, 2021
f428ed0
Version update (#85)
rushang7 Sep 23, 2021
8c7d962
Updated data model version (#87)
rushang7 Sep 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 4 additions & 3 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
* @sathishp-eGov
core/* @sathishp-eGov @rushang7-eGov @GhanshyamRawat-eGov
reference-adapter/* @manikanta-pt-eGov @sathishp-eGov @GhanshyamRawat-eGov
domain-services/* @sathishp-eGov @rushang7-eGov @GhanshyamRawat-eGov
core/ @sathishp-eGov @rushang7-eGov @GhanshyamRawat-eGov
reference-adapter/ @manikanta-pt-eGov @sathishp-eGov @GhanshyamRawat-eGov
domain-services/ @sathishp-eGov @rushang7-eGov @GhanshyamRawat-eGov
utilities/ @sathishp-eGov @rushang7-eGov
44 changes: 44 additions & 0 deletions build/build-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,47 @@ config:
build:
- work-dir: "core/libraries/ifix-services-common"
image-name: "ifix-services-common"
- name: "builds/iFix/core/libraries/ifix-tracer"
build:
- work-dir: "core/libraries/ifix-tracer"
image-name: "ifix-tracer"
- name: "builds/iFix/domain-services/ifix-master-data-service"
build:
- work-dir: "domain-services/ifix-master-data-service"
image-name: "ifix-master-data-service"
dockerfile: "build/maven/Dockerfile"
- name: "builds/iFix/domain-services/fiscal-event-service"
build:
- work-dir: "domain-services/fiscal-event-service"
image-name: "fiscal-event-service"
dockerfile: "build/maven/Dockerfile"
- name: "builds/iFix/domain-services/fiscal-event-post-processor"
build:
- work-dir: "domain-services/fiscal-event-post-processor"
image-name: "fiscal-event-post-processor"
dockerfile: "build/maven/Dockerfile"
- name: "builds/iFix/core/ifix-zuul"
build:
- work-dir: "core/ifix-zuul"
image-name: "ifix-zuul"
dockerfile: "build/maven/Dockerfile"
- name: "builds/iFix/domain-services/ifix-department-entity-service"
build:
- work-dir: "domain-services/ifix-department-entity-service"
image-name: "ifix-department-entity-service"
dockerfile: "build/maven/Dockerfile"
- name: "builds/iFix/reference-adapter"
build:
- work-dir: "reference-adapter"
image-name: "ifix-reference-adapter"
dockerfile: "build/maven/Dockerfile"
- name: "builds/iFix/reference-dashboard/fiscal-event-aggregator"
build:
- work-dir: "reference-dashboard/fiscal-event-aggregator"
image-name: "fiscal-event-aggregator"
dockerfile: "build/maven/Dockerfile"
- name: "builds/iFix/utilities/mongodb-kafka-source-connector"
build:
- work-dir: "utilities/mongodb-kafka-source-connector"
image-name: "mongodb-kafka-source-connector"
dockerfile: "build/maven/Dockerfile"
3 changes: 1 addition & 2 deletions build/maven/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

FROM egovio/alpine-maven-builder-jdk-8:gcp AS build
FROM egovio/alpine-maven-builder-jdk-8:1-master-NA-6036091e AS build
ARG WORK_DIR
WORKDIR /app

Expand Down
5 changes: 5 additions & 0 deletions core/ifix-zuul/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
root = true

[*]
indent_style = space
indent_size = 4
42 changes: 42 additions & 0 deletions core/ifix-zuul/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
*#
*.iml
*.ipr
*.iws
*.jar
*.sw?
*~
.#*
.*.md.html
.DS_Store
.attach_pid*
.classpath
.factorypath
.gradle
.idea
.metadata
.project
.recommenders
.settings
.springBeans
.vscode
/code
MANIFEST.MF
_site/
activemq-data
bin
build
!/**/src/**/bin
!/**/src/**/build
build.log
dependency-reduced-pom.xml
dump.rdb
interpolated*.xml
lib/
manifest.yml
out
overridedb.*
target
.flattened-pom.xml
secrets.yml
.gradletasknamecache
.sts4-cache
32 changes: 32 additions & 0 deletions core/ifix-zuul/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
All notable changes to this module will be documented in this file.

## 1.3.0 - 2021-05-17

- Changes to error handling
- Removed stack trace printing
- Added rate limiting functionality
- Add support for PATCH and PUT statements
- Changed auth filter to not read body if Json content type is not specified
- Removed `x-user-info` header from sensitive headers in `application.properties`

## 1.2.1 - 2021-02-26

- Updated domain name in routes.properties

## 1.2.0 - 2021-01-12

- ZUUL METRIC CAPTURING ADDED

## 1.2.0

## 1.1.0 - 2020-06-22

- Added typescript definition generation plugin
- Upgraded to `tracer:2.0.0-SNAPSHOT`
- Upgraded to spring boot `2.2.6-RELEASE`
- Upgraded to spring-cloud-starter-netflix-zuul `2.2.2.RELEASE`
- Deleted `Dockerfile` and `start.sh` as it is no longer in use

## 1.0.0

- Base version
34 changes: 34 additions & 0 deletions core/ifix-zuul/LOCALSETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Local Setup

To setup the Zuul service in your local system, clone
the [Core Service repository](https://github.com/egovernments/core-services).

## Dependencies

### Infra Dependency

- [ ] Postgres DB
- [ ] Redis
- [ ] Elasticsearch
- [ ] Kafka
- [ ] Consumer
- [ ] Producer

## Running Locally

To run the Zuul services in your local system, you need to port forward below services

```bash
function kgpt(){kubectl get pods -n egov --selector=app=$1 --no-headers=true | head -n1 | awk '{print $1}'}
kubectl port-forward -n egov $(kgpt egov-accesscontrol) 8087:8080
kubectl port-forward -n egov $(kgpt egov-user) 8088:8080
```

Update below listed properties in **`application.properties`** before running the project:

```ini
egov.auth-service-host = http://127.0.0.1:8088
egov.authorize.access.control.host = http://127.0.0.1:8087
# If you are using a local file prefix it with file:///PATH TO FILE/FILENAME
zuul.routes.filepath = {path of file which contain the routing information of each modules}
```
93 changes: 93 additions & 0 deletions core/ifix-zuul/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Zuul Service

### API Gateway

API Gateway provides a unified interface for a set of microservices so that clients do not need to know about all the
details of microservices internals.

Digit uses Zuul as an edge service that proxies requests to multiple back-end services. It provides a unified “front
door” to our ecosystem. This allows any browser, mobile app or other user interface to consume underlying services.

### DB UML Diagram

- NA

### Service Dependencies

- egov-accesscontrol
- egov-user

### Swagger API Contract

- NA

## Service Details

**DIGIT** uses **Netflix ZUUL** as API Gateway.

**Functionality**

- Provides easier API interface to clients
- Can be used to prevent exposing the internal micro-services structure to outside world.
- Allows to refactor microservices without forcing the clients to refactor consuming logic
- Can centralize cross-cutting concerns like security, monitoring, rate limiting etc

**ZUUL Components**

Zuul has mainly four types of filters that enable us to intercept the traffic in different timeline of the request
processing for any particular transaction. We can add any number of filters for a particular url pattern.

- pre filters – are invoked before the request is routed.
- post filters – are invoked after the request has been routed.
- route filters – are used to route the request.
- error filters – are invoked when an error occurs while handling the request.

**Features**

- Microservice authentication and security
- Authorization
- API Routing
- Open APIs using Whitelisting
- RBAC filter
- Logout filter for finance module
- Property module tax calculation filter for firecess
- Request enrichment filter:
- Addition of co-relation id
- Addition of authenticated user’s userinfo to requestHeader.
- Error filter:
- Error response formatting
- Validation Filter to check if a tenant of a particular module is enabled or not.
- Multitenancy Validation Filter. Take the tenant id from Req body or Query Param and validate against additional tenant
role or primary tenant role.
- Devops efficiency: API Response time logging and Send notification if it is taking more time.
- Rate Throttling

**Routing Property**

For each service, below mentioned property has to be add in **`routes.properties`**

```ini
-zuul.routes.{serviceName}.path = /{context path of service}/**
-zuul.routes.{serviceName}.stripPrefix = {true/false}
-zuul.routes.{serviceName}.url = {service host name}
```

**Rate Limiting Property**

For endpoints which requires rate throttling, below mentioned property has to be added in **`limiter.properties`**

```ini
-zuul.ratelimit.policy-list.{serviceName}[0].limit={request number limit per refresh interval window}
-zuul.ratelimit.policy-list.{serviceName}[0].quota={request time limit per refresh interval window (in seconds)}
-zuul.ratelimit.policy-list.{serviceName}[0].refresh-interval={refresh interval in seconds}
-zuul.ratelimit.policy-list.{serviceName}[0].type[0]=url={url of API endpoint}
-zuul.ratelimit.policy-list.{serviceName}[0].type[1]={type of throttling eg: user, origin etc.}
```

### Kafka Consumers

- NA

### Kafka Producers

- NA
Loading