Skip to content

Commit

Permalink
move lunadefend into folder (#696)
Browse files Browse the repository at this point in the history
* move lunadefend into folder

* add required dependencies

* lunadefend unit tests locally work correctly

* refactor github workflows to be more descriptive

* fix docs build

* update package json to have correct paths

* update workflow

Former-commit-id: 50d9854
Former-commit-id: f61cd5f3ae406adac950b9bfc720acf97668e7cf
  • Loading branch information
breadchris authored Jun 3, 2022
1 parent ea8dfa0 commit 19c2c93
Show file tree
Hide file tree
Showing 453 changed files with 6,511 additions and 5,766 deletions.
8 changes: 4 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ module.exports = {
ecmaVersion: 12,
sourceType: 'module',
project: [
'js/sdks/packages/vue-sdk/tsconfig.json',
'js/sdks/tsconfig.json',
'lunadefend/js/sdks/packages/vue-sdk/tsconfig.json',
'lunadefend/js/sdks/tsconfig.json',
'lunadefend/js/demo-apps/packages/demo-back-end/tsconfig.json',
'lunadefend/js/demo-apps/packages/react-front-end/tsconfig.json',
'js/internal-infrastructure/metrics-server-backend/tsconfig.json',
'js/internal-infrastructure/s3-redirect-generator/tsconfig.json',
'lunadefend/js/internal-infrastructure/metrics-server-backend/tsconfig.json',
'lunadefend/js/internal-infrastructure/s3-redirect-generator/tsconfig.json',
'lunatrace/bsl/common/tsconfig.json',
'lunatrace/bsl/frontend/tsconfig.json',
'lunatrace/bsl/backend-cdk/tsconfig.json',
Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ docs/** linguist-documentation
.yarn/** linguist-vendored

# Inventory of Generated Files. Some may be ignored.
js/sdks/packages/tokenizer-sdk/src/generated/** linguist-generated merge=ours
lunadefend/js/sdks/packages/tokenizer-sdk/src/generated/** linguist-generated merge=ours
lunatrace/schema.graphql linguist-generated merge=ours
lunatrace/bsl/backend/src/github/api/generated.ts linguist-generated merge=ours
lunatrace/bsl/backend/src/graphql-yoga/generated-resolver-types.ts linguist-generated merge=ours
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Go
name: Check Go Build

# This workflow posts hasura changes as a comment.
on:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Check Dependencies
name: Check Yarn Dependencies

# This workflow checks to make sure that all dependency binaries are valid, to prevent a sneaky commit doing something malicious
on:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: documentation
name: Documentation Build and Release

on:
push:
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
yarn compile:dev:infrastructure
- name: Build Repo
working-directory: js/sdks
working-directory: lunadefend/js/sdks
run: yarn compile:release
# - name: Set env.BRANCH
# run: echo "BRANCH=$(echo $GITHUB_REF | cut -d'/' -f 3 | cut -d'-' -f 2)" >> $GITHUB_ENV
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ on:
pull_request:
branches: ['**', '**']
paths:
- .disabled
#- '.github/**'
- 'lunadefend/**'

push:
branches: [master]
paths:
- .disabled
#- '.github/**'
- 'lunadefend/**'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: LunaSec Release
name: LunaDefend Release

on:
workflow_dispatch:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: guides
name: LunaTrace Guides Release

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: LunaTrace
name: LunaTrace Integration Test

# This workflow posts hasura changes as a comment.
on:
Expand Down
28 changes: 15 additions & 13 deletions .idea/lunasec-monorepo.iml

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

7 changes: 3 additions & 4 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ lunatrace/bsl/logger @factoidforrest
.github/ @factoidforrest @freeqaz

# Chris
lunatrace/bsl/backend-cdk

# Gabe
docs/ @G00b
lunatrace/bsl/backend-cdk @breadchris
lunatrace/cli @breadchris
docs/blog @breadchris


# CODEOWNERS DOCUMENTATION AND EXAMPLES BELOW ---------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/blog/2021-11-02-our-ci-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ We looked around at other big projects like ours and saw that some of them use m
That's okay, but we wanted more programmatic control over Docker Compose, so we wrote a script that generates the YAML file.

We (okay, it was my very smart coworker) even generated
[typescript types](https://github.com/lunasec-io/lunasec/blob/master/js/sdks/packages/cli/src/docker-compose/docker-compose-types.ts)
[typescript types](https://github.com/lunasec-io/lunasec/blob/master/lunadefend/js/sdks/packages/cli/src/docker-compose/docker-compose-types.ts)
for the YAML file from the official JSON Schema definition.

[Here's the code](https://github.com/lunasec-io/lunasec/blob/master/js/sdks/packages/cli/src/docker-compose/lunasec-stack.ts)
[Here's the code](https://github.com/lunasec-io/lunasec/blob/master/lunadefend/js/sdks/packages/cli/src/docker-compose/lunasec-stack.ts)
that handles generating the `docker-compose.yaml`. As you can see, it's pretty darn clean, with each container represented as a function that returns
a config object. I work with some smart folks. Hopefully someday Docker Compose (or something similar) is going to
expose a JS SDK we can call to set up the cluster programmatically,
Expand Down
26 changes: 13 additions & 13 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ module.exports = {
'docusaurus-plugin-typedoc',
{
id: 'typedoc-react-sdk',
entryPoints: ['../js/sdks/packages/react-sdk/src/types/component-types.ts'],
entryPoints: ['../lunadefend/js/sdks/packages/react-sdk/src/types/component-types.ts'],
defaultCategory:'Component',
tsconfig: '../js/sdks/packages/react-sdk/tsconfig.json',
tsconfig: '../lunadefend/js/sdks/packages/react-sdk/tsconfig.json',
watch: process.env.TYPEDOC_WATCH,
// Without this, our URL becomes `lunasec.io/docs/docs`. I prefer `lunasec.io/docs/pages`.
docsRoot: 'pages',
Expand All @@ -91,8 +91,8 @@ module.exports = {
'docusaurus-plugin-typedoc',
{
id: 'typedoc-node-sdk',
entryPoints: ['../js/sdks/packages/node-sdk/src/index.ts'],
tsconfig: '../js/sdks/packages/node-sdk/tsconfig.json',
entryPoints: ['../lunadefend/js/sdks/packages/node-sdk/src/index.ts'],
tsconfig: '../lunadefend/js/sdks/packages/node-sdk/tsconfig.json',
watch: process.env.TYPEDOC_WATCH,
// Without this, our URL becomes `lunasec.io/docs/docs`. I prefer `lunasec.io/docs/pages`.
docsRoot: 'pages',
Expand All @@ -109,8 +109,8 @@ module.exports = {
'docusaurus-plugin-typedoc',
{
id: 'typedoc-tokenizer',
entryPoints: ['../js/sdks/packages/tokenizer-sdk/src/index.ts'],
tsconfig: '../js/sdks/packages/tokenizer-sdk/tsconfig.json',
entryPoints: ['../lunadefend/js/sdks/packages/tokenizer-sdk/src/index.ts'],
tsconfig: '../lunadefend/js/sdks/packages/tokenizer-sdk/tsconfig.json',
watch: process.env.TYPEDOC_WATCH,
// Without this, our URL becomes `lunasec.io/docs/docs`. I prefer `lunasec.io/docs/pages`.
docsRoot: 'pages',
Expand All @@ -128,8 +128,8 @@ module.exports = {
'docusaurus-plugin-typedoc',
{
id: 'typedoc-cli',
entryPoints: ['../js/sdks/packages/cli/src/config/types.ts'],
tsconfig: '../js/sdks/packages/cli/tsconfig.json',
entryPoints: ['../lunadefend/js/sdks/packages/cli/src/config/types.ts'],
tsconfig: '../lunadefend/js/sdks/packages/cli/tsconfig.json',
watch: process.env.TYPEDOC_WATCH,
// Without this, our URL becomes `lunasec.io/docs/docs`. I prefer `lunasec.io/docs/pages`.
docsRoot: 'pages',
Expand Down Expand Up @@ -173,15 +173,15 @@ module.exports = {
items: [
{
type: 'doc',
docId: 'lunadefend/overview/introduction',
docId: 'lunatrace/overview/introduction',
position: 'left',
label: 'LunaDefend'
label: 'LunaTrace'
},
{
{
type: 'doc',
docId: 'lunatrace/overview/introduction',
docId: 'lunadefend/overview/introduction',
position: 'left',
label: 'LunaTrace'
label: 'LunaDefend'
},
{
to: '/docs/blog',
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"clear": "docusaurus clear",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"openapi:generate": "redoc-cli bundle ../api-spec/schema/full-tokenizer.yaml --output static/tokenizer-api-spec-static/index.html"
"openapi:generate": "redoc-cli bundle ../lunadefend/api-spec/schema/full-tokenizer.yaml --output static/tokenizer-api-spec-static/index.html"
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.9",
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/lunadefend/cli/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sidebar_position: 3
LunaDefend can be deployed to AWS using the LunaDefend CLI, available in the `@lunasec/cli` npm package. More information on installing and using the CLI can be
found in the [Getting Started Guide](/pages/lunadefend/getting-started/dedicated-tokenizer/introduction)

The deploy command configures a deployment by reading the closest `lunasec.js` file to the current directory. The CLI tool will
The deploy command configures a deployment by reading the closest `lunadefend.js` file to the current directory. The CLI tool will
recursively search in parent directories for this file until it gets to the root of the file system.

For a standard deployment of LunaDefend, you will only need to specify:
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/lunadefend/deployment/analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = {
}
}
```
in your `lunasec.json` config before LunaDefend is deployed. Setting this flag will disable deploying the Lambda that collects metrics every
in your `lunadefend.js` config before LunaDefend is deployed. Setting this flag will disable deploying the Lambda that collects metrics every
24 hours.

Regardless, thank you for using LunaDefend and helping to improve the security of software across the world. We really
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/lunadefend/deployment/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ In order to deploy LunaDefend into your infrastructure, you are going to need tw

The CLI can be installed via NPM, as described in the [getting started guide](/pages/lunadefend/getting-started/dedicated-tokenizer/introduction/#cli).

The LunaDefend CLI tool needs a configuration file which reflects your infrastructure. To do this, create the file (or add to your existing) `lunasec.js`
The LunaDefend CLI tool needs a configuration file which reflects your infrastructure. To do this, create the file (or add to your existing) `lunadefend.js`
and put this as its contents:
```js
module.exports = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ lunasec --version
```
and we should see that the CLI is installed.

The LunaDefend CLI needs to be configured to know where your application's front and back end are. To do this, in the root of your repository create the file `lunasec.js` with the contents:
The LunaDefend CLI needs to be configured to know where your application's front and back end are. To do this, in the root of your repository create the file `lunadefend.js` with the contents:
```js
module.exports = {
development: {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/lunadefend/how-it-works/grants.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ applications that might need to detokenize a token more than 15 minutes after it
[can be customized](/pages/lunadefend/node-sdk/classes/Grants/)
during creation if you find that you need a longer duration, up to your configured maximum.

The default duration and maximum duration can be configured in your `lunasec.js` [config file](/pages/lunadefend/cli-config/interfaces/DeploymentConfigOptions/),
The default duration and maximum duration can be configured in your `lunadefend.js` [config file](/pages/lunadefend/cli-config/interfaces/DeploymentConfigOptions/),
in the grants options.

### Alternatives
Expand Down
Loading

0 comments on commit 19c2c93

Please sign in to comment.