State

[progress record]:

Proposed time: 2022/08/30

Discussion time: 2022/08/30

Accept/reject time: 2022/08/3

Complete time:

[issues]

[email]: After creating the LKIP and writing the preliminary content, start a discussion on the LKIP proposal. Currently, the discussion must be initiated in the WeChat group [Apache Linkis Community Development Group], and the minutes can be sent to the official dev mailbox of linkis. The email address for the minutes can be placed here

[release]: The (planned) release version of Linkis

[proposer]:

Motivation & Background

At present, when linkis performs tasks, there is no association between IP addresses and users, which will cause users to continue to perform tasks under multiple IP addresses. In order to prevent this from happening, new IP address interception is added. Binding a user to prevent a user from having multiple IP addresses

Basic concept

Expect to achieve goals

  • The linkis user needs to configure the IP address to bind with the user, and linkis will intercept the IP address according to the user's configuration.

Implementation plan

  • By intercepting, obtain jobRequest, obtain user information, match the IP information configured by the user, and then intercept
  • flow chart:

Function realization
1. Data cache
   Cache the tenant tag table information (the principle is the same as that of the sensitive table intercepting cached data)
   When the configuration table is updated, the cache is updated (increased)
2. Data configuration'
   Add a new page for data configuration
   Configuration relationship: One user-Creator can configure multiple IP addresses (demo: Hadoop – 10.224.22.22, 10.224.11.11, 10.122.32.32),
   User can use *, IP can also use *, creator cannot be * (unique)
   Compatibility, Deprecation and Migration Plans

Changes


Modification Detail
1
Modification of maven module


2Modification of HTTP interface
Interface List Interface NameFunctionRemarks
createUserIP new IP      

updateUserIP Modify IP

deleteUserIP  delete IP   

queryUserIPList  query tag IP 

  getUserIP        Get IP through userCreator

3Modification of the client interface
4Modification of database table structure

Add User_IP table

Field Type Name Remarks
id number serial 
user varchar user
creator varchar creator
ip_list varchar  ip addressMultiple IPs are separated by commas
create_time datetime  create time
update_time datetimeupdate time
desc varchar sources of business
bussiness_user varchar docking person
user_creatorkeyindex
5Modification of configuration item
6Modification Error code 
7Modifications for Third Party Dependencies

Compatibility, Deprecation, and Migration Plan

  • What impact (if any) will there be on existing users?
  • If we are changing behavior, how will we phase out the older behavior?
  • If we require special migration tools, describe them here.
  • When will we remove the existing behavior?