Skip to content

Commit

Permalink
Merge branch 'master' into snowflake_private_key
Browse files Browse the repository at this point in the history
  • Loading branch information
treff7es authored Dec 2, 2022
2 parents f977f05 + 4f7b5ac commit 604e57e
Show file tree
Hide file tree
Showing 52 changed files with 374 additions and 310 deletions.
28 changes: 18 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ buildscript {
ext.neo4jVersion = '4.4.9'
ext.graphQLJavaVersion = '19.0'
ext.testContainersVersion = '1.17.4'
ext.jacksonVersion = '2.13.4'
ext.jettyVersion = '9.4.46.v20220331'
apply from: './repositories.gradle'
buildscript.repositories.addAll(project.repositories)
dependencies {
Expand Down Expand Up @@ -57,6 +59,7 @@ project.ext.externalDependency = [
'commonsCli': 'commons-cli:commons-cli:1.5.0',
'commonsIo': 'commons-io:commons-io:2.4',
'commonsLang': 'commons-lang:commons-lang:2.6',
'commonsText': 'org.apache.commons:commons-text:1.10.0',
'commonsCollections': 'commons-collections:commons-collections:3.2.2',
'data' : 'com.linkedin.pegasus:data:' + pegasusVersion,
'datastaxOssNativeProtocol': 'com.datastax.oss:native-protocol:1.5.1',
Expand All @@ -75,7 +78,7 @@ project.ext.externalDependency = [
'gson': 'com.google.code.gson:gson:2.8.9',
'guice': 'com.google.inject:guice:4.2.2',
'guava': 'com.google.guava:guava:27.0.1-jre',
'h2': 'com.h2database:h2:2.1.210',
'h2': 'com.h2database:h2:2.1.214',
'hadoopClient': 'org.apache.hadoop:hadoop-client:3.2.1',
'hadoopCommon':'org.apache.hadoop:hadoop-common:2.7.2',
'hadoopMapreduceClient':'org.apache.hadoop:hadoop-mapreduce-client-core:2.7.2',
Expand All @@ -84,15 +87,18 @@ project.ext.externalDependency = [
'httpClient': 'org.apache.httpcomponents:httpclient:4.5.9',
'httpAsyncClient': 'org.apache.httpcomponents:httpasyncclient:4.1.5',
'iStackCommons': 'com.sun.istack:istack-commons-runtime:4.0.1',
'jacksonCore': 'com.fasterxml.jackson.core:jackson-core:2.13.2',
'jacksonDataBind': 'com.fasterxml.jackson.core:jackson-databind:2.13.2.2',
'jacksonDataFormatYaml': 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.2',
'jacksonCore': "com.fasterxml.jackson.core:jackson-core:$jacksonVersion",
'jacksonDataBind': "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion.2",
'jacksonDataFormatYaml': "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jacksonVersion",
'woodstoxCore': 'com.fasterxml.woodstox:woodstox-core:6.4.0',
'javatuples': 'org.javatuples:javatuples:1.2',
'javaxInject' : 'javax.inject:javax.inject:1',
'javaxValidation' : 'javax.validation:validation-api:2.0.1.Final',
'jerseyCore': 'org.glassfish.jersey.core:jersey-client:2.25.1',
'jerseyGuava': 'org.glassfish.jersey.bundles.repackaged:jersey-guava:2.25.1',
'jettyJaas': 'org.eclipse.jetty:jetty-jaas:9.4.46.v20220331',
'jettyJaas': "org.eclipse.jetty:jetty-jaas:$jettyVersion",
'jettyClient': "org.eclipse.jetty:jetty-client:$jettyVersion",
'jettison': 'org.codehaus.jettison:jettison:1.5.2',
'jgrapht': 'org.jgrapht:jgrapht-core:1.5.1',
'jna': 'net.java.dev.jna:jna:5.12.1',
'jsonPatch': 'com.github.java-json-tools:json-patch:1.13',
Expand Down Expand Up @@ -136,14 +142,15 @@ project.ext.externalDependency = [
'playTest': 'com.typesafe.play:play-test_2.12:2.7.6',
'pac4j': 'org.pac4j:pac4j-oidc:3.6.0',
'playPac4j': 'org.pac4j:play-pac4j_2.12:8.0.2',
'postgresql': 'org.postgresql:postgresql:42.3.3',
'protobuf': 'com.google.protobuf:protobuf-java:3.19.3',
'postgresql': 'org.postgresql:postgresql:42.3.8',
'protobuf': 'com.google.protobuf:protobuf-java:3.19.6',
'rangerCommons': 'org.apache.ranger:ranger-plugins-common:2.3.0',
'reflections': 'org.reflections:reflections:0.9.9',
'resilience4j': 'io.github.resilience4j:resilience4j-retry:1.7.1',
'rythmEngine': 'org.rythmengine:rythm-engine:1.3.0',
'servletApi': 'javax.servlet:javax.servlet-api:3.1.0',
'shiroCore': 'org.apache.shiro:shiro-core:1.8.0',
'shiroCore': 'org.apache.shiro:shiro-core:1.10.0',
'snakeYaml': 'org.yaml:snakeyaml:1.33',
'sparkSql' : 'org.apache.spark:spark-sql_2.11:2.4.8',
'sparkHive' : 'org.apache.spark:spark-hive_2.11:2.4.8',
'springBeans': "org.springframework:spring-beans:$springVersion",
Expand Down Expand Up @@ -184,6 +191,7 @@ configure(subprojects.findAll {! it.name.startsWith('spark-lineage') }) {

configurations.all {
exclude group: "io.netty", module: "netty"
exclude group: "log4j", module: "log4j"
exclude group: "org.springframework.boot", module: "spring-boot-starter-logging"
exclude group: "ch.qos.logback", module: "logback-classic"
exclude group: "org.apache.logging.log4j", module: "log4j-to-slf4j"
Expand Down Expand Up @@ -219,8 +227,8 @@ subprojects {
implementation('org.apache.commons:commons-compress:1.21')
implementation('org.apache.velocity:velocity-engine-core:2.3')
implementation('org.hibernate:hibernate-validator:6.0.20.Final')
implementation('com.fasterxml.jackson.core:jackson-databind:2.13.2.2')
implementation('com.fasterxml.jackson.core:jackson-dataformat-cbor:2.13.2')
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion.2")
implementation("com.fasterxml.jackson.core:jackson-dataformat-cbor:$jacksonVersion")
}
}

Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies {
exclude group: 'com.google.guava', module: 'guava'
}
compile 'com.google.guava:guava:27.0.1-jre'
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.10.7'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.11'
compile 'com.fasterxml.jackson.core:jackson-databind:2.13.4.2'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.4'
compile 'commons-io:commons-io:2.11.0'
}
2 changes: 1 addition & 1 deletion datahub-frontend/play.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies {

constraints {
play('org.springframework:spring-core:5.2.3.RELEASE')
play('com.fasterxml.jackson.core:jackson-databind:2.9.10.4')
play(externalDependency.jacksonDataBind)
play('com.nimbusds:nimbus-jose-jwt:7.9')
play('com.typesafe.akka:akka-actor_2.12:2.5.16')
play('net.minidev:json-smart:2.4.1')
Expand Down
4 changes: 2 additions & 2 deletions datahub-graphql-core/src/main/resources/tests.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ extend type Mutation {
updateTest(urn: String!, input: UpdateTestInput!): String

"""
Create an existing test - note that this will NOT delete dangling pointers until the next execution of the test.
Delete an existing test - note that this will NOT delete dangling pointers until the next execution of the test.
"""
deleteTest(urn: String!): Boolean
}
}
12 changes: 12 additions & 0 deletions datahub-ranger-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ dependencies {
implementation externalDependency.hadoopCommon3
implementation externalDependency.log4jApi

constraints {
implementation(externalDependency.woodstoxCore) {
because("previous versions are vulnerable to CVE-2022-40151 CVE-2022-40152")
}
implementation(externalDependency.jettyClient) {
because("previous versions are vulnerable to CVE-2021-28165")
}
implementation(externalDependency.jettison) {
because("previous versions are vulnerable to CVE-2022-40149 CVE-2022-40150")
}
}

testCompile externalDependency.testng
}

Expand Down
28 changes: 15 additions & 13 deletions datahub-web-react/src/app/domain/CreateDomainModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,9 @@ const DESCRIPTION_FIELD_NAME = 'description';

export default function CreateDomainModal({ onClose, onCreate }: Props) {
const [createDomainMutation] = useCreateDomainMutation();
const [createButtonEnabled, setCreateButtonEnabled] = useState(true);
const [createButtonEnabled, setCreateButtonEnabled] = useState(false);
const [form] = Form.useForm();

const setStagedName = (name) => {
form.setFieldsValue({
name,
});
};

const onCreateDomain = () => {
createDomainMutation({
variables: {
Expand Down Expand Up @@ -88,7 +82,7 @@ export default function CreateDomainModal({ onClose, onCreate }: Props) {
<Button onClick={onClose} type="text">
Cancel
</Button>
<Button id="createDomainButton" onClick={onCreateDomain} disabled={createButtonEnabled}>
<Button id="createDomainButton" onClick={onCreateDomain} disabled={!createButtonEnabled}>
Create
</Button>
</>
Expand All @@ -98,9 +92,9 @@ export default function CreateDomainModal({ onClose, onCreate }: Props) {
form={form}
initialValues={{}}
layout="vertical"
onFieldsChange={() =>
setCreateButtonEnabled(form.getFieldsError().some((field) => field.errors.length > 0))
}
onFieldsChange={() => {
setCreateButtonEnabled(!form.getFieldsError().some((field) => field.errors.length > 0));
}}
>
<Form.Item label={<Typography.Text strong>Name</Typography.Text>}>
<Typography.Paragraph>Give your new Domain a name. </Typography.Paragraph>
Expand All @@ -121,7 +115,15 @@ export default function CreateDomainModal({ onClose, onCreate }: Props) {
<SuggestedNamesGroup>
{SUGGESTED_DOMAIN_NAMES.map((name) => {
return (
<ClickableTag key={name} onClick={() => setStagedName(name)}>
<ClickableTag
key={name}
onClick={() => {
form.setFieldsValue({
name,
});
setCreateButtonEnabled(true);
}}
>
{name}
</ClickableTag>
);
Expand All @@ -137,7 +139,7 @@ export default function CreateDomainModal({ onClose, onCreate }: Props) {
rules={[{ whitespace: true }, { min: 1, max: 500 }]}
hasFeedback
>
<Input placeholder="A description for your domain" />
<Input.TextArea placeholder="A description for your domain" />
</Form.Item>
</Form.Item>
<Collapse ghost>
Expand Down
76 changes: 29 additions & 47 deletions datahub-web-react/src/app/ingest/secret/SecretBuilderModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import React, { useState } from 'react';
import { useEnterKeyListener } from '../../shared/useEnterKeyListener';
import { SecretBuilderState } from './types';

const NAME_FIELD_NAME = 'name';
const DESCRIPTION_FIELD_NAME = 'description';
const VALUE_FIELD_NAME = 'value';

type Props = {
initialState?: SecretBuilderState;
visible: boolean;
Expand All @@ -11,38 +15,15 @@ type Props = {
};

export const SecretBuilderModal = ({ initialState, visible, onSubmit, onCancel }: Props) => {
const [secretBuilderState, setSecretBuilderState] = useState<SecretBuilderState>(initialState || {});
const [createButtonEnabled, setCreateButtonEnabled] = useState(true);
const [createButtonEnabled, setCreateButtonEnabled] = useState(false);
const [form] = Form.useForm();

const setName = (name: string) => {
setSecretBuilderState({
...secretBuilderState,
name,
});
};

const setValue = (value: string) => {
setSecretBuilderState({
...secretBuilderState,
value,
});
};

const setDescription = (description: string) => {
setSecretBuilderState({
...secretBuilderState,
description,
});
};

// Handle the Enter press
useEnterKeyListener({
querySelectorToExecuteClick: '#createSecretButton',
});

function resetValues() {
setSecretBuilderState({});
form.resetFields();
}

Expand All @@ -60,8 +41,17 @@ export const SecretBuilderModal = ({ initialState, visible, onSubmit, onCancel }
</Button>
<Button
id="createSecretButton"
onClick={() => onSubmit?.(secretBuilderState, resetValues)}
disabled={createButtonEnabled}
onClick={() =>
onSubmit?.(
{
name: form.getFieldValue(NAME_FIELD_NAME),
description: form.getFieldValue(DESCRIPTION_FIELD_NAME),
value: form.getFieldValue(VALUE_FIELD_NAME),
},
resetValues,
)
}
disabled={!createButtonEnabled}
>
Create
</Button>
Expand All @@ -73,38 +63,35 @@ export const SecretBuilderModal = ({ initialState, visible, onSubmit, onCancel }
initialValues={initialState}
layout="vertical"
onFieldsChange={() =>
setCreateButtonEnabled(form.getFieldsError().some((field) => field.errors.length > 0))
setCreateButtonEnabled(!form.getFieldsError().some((field) => field.errors.length > 0))
}
>
<Form.Item label={<Typography.Text strong>Name</Typography.Text>}>
<Typography.Paragraph>
Give your secret a name. This is what you&apos;ll use to reference the secret from your recipes.
</Typography.Paragraph>
<Form.Item
name="name"
name={NAME_FIELD_NAME}
rules={[
{
required: true,
message: 'Enter a name.',
},
{ whitespace: true },
{ whitespace: false },
{ min: 1, max: 50 },
{ pattern: /^[^\s\t${}\\,'"]+$/, message: 'This secret name is not allowed.' },
]}
hasFeedback
>
<Input
placeholder="A name for your secret"
value={secretBuilderState.name}
onChange={(event) => setName(event.target.value)}
/>
<Input placeholder="A name for your secret" />
</Form.Item>
</Form.Item>
<Form.Item label={<Typography.Text strong>Value</Typography.Text>}>
<Typography.Paragraph>
The value of your secret, which will be encrypted and stored securely within DataHub.
</Typography.Paragraph>
<Form.Item
name="value"
name={VALUE_FIELD_NAME}
rules={[
{
required: true,
Expand All @@ -115,24 +102,19 @@ export const SecretBuilderModal = ({ initialState, visible, onSubmit, onCancel }
]}
hasFeedback
>
<Input.TextArea
placeholder="The value of your secret"
value={secretBuilderState.value}
onChange={(event) => setValue(event.target.value)}
autoComplete="false"
/>
<Input.TextArea placeholder="The value of your secret" autoComplete="false" />
</Form.Item>
</Form.Item>
<Form.Item label={<Typography.Text strong>Description</Typography.Text>}>
<Typography.Paragraph>
An optional description to help keep track of your secret.
</Typography.Paragraph>
<Form.Item name="description" rules={[{ whitespace: true }, { min: 1, max: 500 }]} hasFeedback>
<Input
placeholder="The value of your secret"
value={secretBuilderState.description}
onChange={(event) => setDescription(event.target.value)}
/>
<Form.Item
name={DESCRIPTION_FIELD_NAME}
rules={[{ whitespace: true }, { min: 1, max: 500 }]}
hasFeedback
>
<Input.TextArea placeholder="A description for your secret" />
</Form.Item>
</Form.Item>
</Form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export default function DictField({ field, removeMargin }: Props) {
{field.keyField && (
<StyledFormItem
{...restField}
required={field.required}
name={[name, field.keyField.name]}
initialValue=""
label={field.keyField.label}
Expand Down
Loading

0 comments on commit 604e57e

Please sign in to comment.