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

feat: Add configurable shield rule #609

Merged
merged 3 commits into from
Apr 16, 2024
Merged

feat: Add configurable shield rule #609

merged 3 commits into from
Apr 16, 2024

Conversation

blaine-arcjet
Copy link
Contributor

This adds the configurable shield rule for users to add to their rules.

I also updated the protobuf generated code and cleaned up the fingerprint stuff that was removed.

@davidmytton I modified most examples to add shield() since we generally want people to enable it, but let me know if you had something else in mind.

Closes #606

@blaine-arcjet blaine-arcjet requested a review from a team as a code owner April 16, 2024 20:40
Copy link

trunk-io bot commented Apr 16, 2024

😎 Merged successfully - details.

Copy link
Contributor

@davidmytton davidmytton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeh looks good - including it in all the examples is a good idea so we can encourage usage.

@trunk-io trunk-io bot merged commit a5717a1 into main Apr 16, 2024
20 checks passed
@trunk-io trunk-io bot deleted the phated/shield-rule branch April 16, 2024 21:02
trunk-io bot pushed a commit that referenced this pull request Apr 18, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>@arcjet/decorate: 1.0.0-alpha.12</summary>

## [1.0.0-alpha.12](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.11...@arcjet/decorate-v1.0.0-alpha.12) (2024-04-18)


### 📦 Dependencies

* **dev:** Bump @rollup/wasm-node from 4.14.1 to 4.14.3 ([#597](#597)) ([598adf0](598adf0))
* **dev:** Bump typescript from 5.4.4 to 5.4.5 ([#557](#557)) ([16af391](16af391))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @arcjet/logger bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/protocol bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/rollup-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/tsconfig bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
</details>

<details><summary>@arcjet/duration: 1.0.0-alpha.12</summary>

## [1.0.0-alpha.12](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.11...@arcjet/duration-v1.0.0-alpha.12) (2024-04-18)


### 📦 Dependencies

* **dev:** Bump @rollup/wasm-node from 4.14.1 to 4.14.3 ([#597](#597)) ([598adf0](598adf0))
* **dev:** Bump typescript from 5.4.4 to 5.4.5 ([#557](#557)) ([16af391](16af391))


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/rollup-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/tsconfig bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
</details>

<details><summary>@arcjet/next: 1.0.0-alpha.12</summary>

## [1.0.0-alpha.12](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.11...@arcjet/next-v1.0.0-alpha.12) (2024-04-18)


### 📦 Dependencies

* **dev:** Bump @rollup/wasm-node from 4.14.1 to 4.14.3 ([#597](#597)) ([598adf0](598adf0))
* **dev:** Bump typescript from 5.4.4 to 5.4.5 ([#557](#557)) ([16af391](16af391))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @arcjet/ip bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * arcjet bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/rollup-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/tsconfig bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
</details>

<details><summary>@arcjet/node: 1.0.0-alpha.12</summary>

## [1.0.0-alpha.12](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.11...@arcjet/node-v1.0.0-alpha.12) (2024-04-18)


### 📦 Dependencies

* **dev:** Bump @rollup/wasm-node from 4.14.1 to 4.14.3 ([#597](#597)) ([598adf0](598adf0))
* **dev:** Bump typescript from 5.4.4 to 5.4.5 ([#557](#557)) ([16af391](16af391))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @arcjet/ip bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * arcjet bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/rollup-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/tsconfig bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
</details>

<details><summary>@arcjet/analyze: 1.0.0-alpha.12</summary>

## [1.0.0-alpha.12](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.11...@arcjet/analyze-v1.0.0-alpha.12) (2024-04-18)


### 📦 Dependencies

* **dev:** Bump @rollup/wasm-node from 4.14.1 to 4.14.3 ([#597](#597)) ([598adf0](598adf0))
* **dev:** Bump typescript from 5.4.4 to 5.4.5 ([#557](#557)) ([16af391](16af391))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @arcjet/logger bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/rollup-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/tsconfig bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
</details>

<details><summary>@arcjet/eslint-config: 1.0.0-alpha.12</summary>

## [1.0.0-alpha.12](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.11...@arcjet/eslint-config-v1.0.0-alpha.12) (2024-04-18)


### 📦 Dependencies

* Bump eslint-config-next from 14.1.4 to 14.2.1 ([#585](#585)) ([b92474b](b92474b))
* Bump eslint-config-next from 14.2.1 to 14.2.2 ([#621](#621)) ([3268a70](3268a70))
</details>

<details><summary>@arcjet/ip: 1.0.0-alpha.12</summary>

## [1.0.0-alpha.12](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.11...@arcjet/ip-v1.0.0-alpha.12) (2024-04-18)


### 📦 Dependencies

* **dev:** Bump @rollup/wasm-node from 4.14.1 to 4.14.3 ([#597](#597)) ([598adf0](598adf0))
* **dev:** Bump typescript from 5.4.4 to 5.4.5 ([#557](#557)) ([16af391](16af391))


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/rollup-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/tsconfig bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
</details>

<details><summary>@arcjet/logger: 1.0.0-alpha.12</summary>

## [1.0.0-alpha.12](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.11...@arcjet/logger-v1.0.0-alpha.12) (2024-04-18)


### 📦 Dependencies

* **dev:** Bump @rollup/wasm-node from 4.14.1 to 4.14.3 ([#597](#597)) ([598adf0](598adf0))
* **dev:** Bump typescript from 5.4.4 to 5.4.5 ([#557](#557)) ([16af391](16af391))


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/rollup-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/tsconfig bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
</details>

<details><summary>@arcjet/protocol: 1.0.0-alpha.12</summary>

## [1.0.0-alpha.12](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.11...@arcjet/protocol-v1.0.0-alpha.12) (2024-04-18)


### 🚀 New Features

* Add configurable shield rule ([#609](#609)) ([a5717a1](a5717a1)), closes [#606](#606)


### 📦 Dependencies

* Bump typeid-js from 0.5.0 to 0.6.0 ([#566](#566)) ([b6dcaeb](b6dcaeb))
* Bump typeid-js from 0.6.0 to 0.7.0 ([#620](#620)) ([8b09974](8b09974))
* **dev:** Bump @rollup/wasm-node from 4.14.1 to 4.14.3 ([#597](#597)) ([598adf0](598adf0))
* **dev:** Bump typescript from 5.4.4 to 5.4.5 ([#557](#557)) ([16af391](16af391))


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/rollup-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/tsconfig bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
</details>

<details><summary>@arcjet/rollup-config: 1.0.0-alpha.12</summary>

## [1.0.0-alpha.12](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.11...@arcjet/rollup-config-v1.0.0-alpha.12) (2024-04-18)


### 📦 Dependencies

* **dev:** Bump @rollup/wasm-node from 4.14.1 to 4.14.3 ([#597](#597)) ([598adf0](598adf0))
* **dev:** Bump typescript from 5.4.4 to 5.4.5 ([#557](#557)) ([16af391](16af391))


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/tsconfig bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
</details>

<details><summary>@arcjet/tsconfig: 1.0.0-alpha.12</summary>

## [1.0.0-alpha.12](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.11...@arcjet/tsconfig-v1.0.0-alpha.12) (2024-04-18)


### 🧹 Miscellaneous Chores

* **@arcjet/tsconfig:** Synchronize arcjet-js versions
</details>

<details><summary>arcjet: 1.0.0-alpha.12</summary>

## [1.0.0-alpha.12](v1.0.0-alpha.11...arcjet-v1.0.0-alpha.12) (2024-04-18)


### ⚠ BREAKING CHANGES

* Deprecate calling `protect()` with no rules ([#608](#608))

### 🚀 New Features

* Add configurable shield rule ([#609](#609)) ([a5717a1](a5717a1)), closes [#606](#606)
* Add urls for Arcjet fly.io deployments ([#554](#554)) ([27d946b](27d946b))


### 📦 Dependencies

* **dev:** Bump @rollup/wasm-node from 4.14.1 to 4.14.3 ([#597](#597)) ([598adf0](598adf0))
* **dev:** Bump typescript from 5.4.4 to 5.4.5 ([#557](#557)) ([16af391](16af391))


### 🧹 Miscellaneous Chores

* Deprecate calling `protect()` with no rules ([#608](#608)) ([57a8f6b](57a8f6b))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @arcjet/analyze bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/duration bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/logger bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/protocol bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/rollup-config bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
    * @arcjet/tsconfig bumped from 1.0.0-alpha.11 to 1.0.0-alpha.12
</details>

<details><summary>1.0.0-alpha.12</summary>

## [1.0.0-alpha.12](v1.0.0-alpha.11...v1.0.0-alpha.12) (2024-04-18)


### ⚠ BREAKING CHANGES

* Deprecate calling `protect()` with no rules ([#608](#608))

### 🚀 New Features

* Add configurable shield rule ([#609](#609)) ([a5717a1](a5717a1)), closes [#606](#606)
* Add urls for Arcjet fly.io deployments ([#554](#554)) ([27d946b](27d946b))


### 📦 Dependencies

* Bump eslint-config-next from 14.1.4 to 14.2.1 ([#585](#585)) ([b92474b](b92474b))
* Bump eslint-config-next from 14.2.1 to 14.2.2 ([#621](#621)) ([3268a70](3268a70))
* Bump typeid-js from 0.5.0 to 0.6.0 ([#566](#566)) ([b6dcaeb](b6dcaeb))
* Bump typeid-js from 0.6.0 to 0.7.0 ([#620](#620)) ([8b09974](8b09974))
* **dev:** Bump @rollup/wasm-node from 4.14.1 to 4.14.3 ([#597](#597)) ([598adf0](598adf0))
* **dev:** Bump typescript from 5.4.4 to 5.4.5 ([#557](#557)) ([16af391](16af391))
* **example:** Bump eslint-config-next from 14.1.4 to 14.2.1 in /examples/nextjs-example in the dependencies group ([#583](#583)) ([93b7d22](93b7d22))
* **example:** Bump eslint-config-next from 14.2.1 to 14.2.2 in /examples/nextjs-13-pages-wrap in the dependencies group ([#631](#631)) ([78e7f71](78e7f71))
* **example:** Bump eslint-config-next from 14.2.1 to 14.2.2 in /examples/nextjs-example in the dependencies group ([#626](#626)) ([99c54ae](99c54ae))
* **example:** Bump hono from 4.2.4 to 4.2.5 in /examples/nodejs-hono-rl in the dependencies group ([#628](#628)) ([27f6d41](27f6d41))
* **example:** Bump the dependencies group across 1 directory with 3 updates ([#634](#634)) ([c57b920](c57b920))
* **example:** Bump the dependencies group across 1 directory with 3 updates ([#635](#635)) ([a0d587b](a0d587b))
* **example:** Bump the dependencies group across 1 directory with 6 updates ([#611](#611)) ([950279d](950279d))
* **example:** Bump the dependencies group in /examples/nextjs-13-pages-wrap with 3 updates ([#592](#592)) ([d24c26f](d24c26f))
* **example:** Bump the dependencies group in /examples/nextjs-14-app-dir-rl with 2 updates ([#624](#624)) ([f4038dd](f4038dd))
* **example:** Bump the dependencies group in /examples/nextjs-14-app-dir-rl with 4 updates ([#600](#600)) ([b02997f](b02997f))
* **example:** Bump the dependencies group in /examples/nextjs-14-app-dir-validate-email with 2 updates ([#618](#618)) ([183cd3f](183cd3f))
* **example:** Bump the dependencies group in /examples/nextjs-14-app-dir-validate-email with 4 updates ([#596](#596)) ([b1aac10](b1aac10))
* **example:** Bump the dependencies group in /examples/nextjs-14-authjs-5 with 2 updates ([#632](#632)) ([baf13f3](baf13f3))
* **example:** Bump the dependencies group in /examples/nextjs-14-authjs-5 with 4 updates ([#598](#598)) ([bd3ae6e](bd3ae6e))
* **example:** Bump the dependencies group in /examples/nextjs-14-clerk-rl with 2 updates ([#625](#625)) ([a08a5b3](a08a5b3))
* **example:** Bump the dependencies group in /examples/nextjs-14-clerk-rl with 5 updates ([#594](#594)) ([a53aa2d](a53aa2d))
* **example:** Bump the dependencies group in /examples/nextjs-14-clerk-shield with 5 updates ([#599](#599)) ([43fc6e6](43fc6e6))
* **example:** Bump the dependencies group in /examples/nextjs-14-decorate with 2 updates ([#627](#627)) ([2ebf3fe](2ebf3fe))
* **example:** Bump the dependencies group in /examples/nextjs-14-decorate with 4 updates ([#593](#593)) ([e250755](e250755))
* **example:** Bump the dependencies group in /examples/nextjs-14-ip-details with 2 updates ([#629](#629)) ([235599c](235599c))
* **example:** Bump the dependencies group in /examples/nextjs-14-ip-details with 4 updates ([#602](#602)) ([56b8338](56b8338))
* **example:** Bump the dependencies group in /examples/nextjs-14-nextauth-4 with 2 updates ([#633](#633)) ([10aa44e](10aa44e))
* **example:** Bump the dependencies group in /examples/nextjs-14-nextauth-4 with 4 updates ([#601](#601)) ([e9cd5ee](e9cd5ee))
* **example:** Bump the dependencies group in /examples/nextjs-14-openai with 3 updates ([#630](#630)) ([f381437](f381437))
* **example:** Bump the dependencies group in /examples/nextjs-14-pages-wrap with 2 updates ([#623](#623)) ([a499f3f](a499f3f))
* **example:** Bump the dependencies group in /examples/nextjs-14-pages-wrap with 4 updates ([#591](#591)) ([0d6a7d5](0d6a7d5))
* **example:** Bump the dependencies group in /examples/nextjs-14-react-hook-form with 9 updates ([#603](#603)) ([a46de79](a46de79))
* **example:** Bump the dependencies group in /examples/nodejs-hono-rl with 2 updates ([#580](#580)) ([e49db56](e49db56))


### 📝 Documentation

* **examples:** Add missing Vercel external-id ([#617](#617)) ([cb59c81](cb59c81))
* **examples:** Fix build warnings ([#616](#616)) ([e2cbd2a](e2cbd2a))
* **examples:** Fix deploy button rendering ([#614](#614)) ([515168b](515168b))
* **examples:** Remove redirect from deploy button ([#615](#615)) ([2f93ba6](2f93ba6))
* **examples:** Remove shield from rule ([1eb02d2](1eb02d2))
* **examples:** Remove shield from rules ([#613](#613)) ([1eb02d2](1eb02d2))


### 🧹 Miscellaneous Chores

* **ci:** Temporarily ignore eslint 9 updates ([#543](#543)) ([a8ac938](a8ac938))
* Deprecate calling `protect()` with no rules ([#608](#608)) ([57a8f6b](57a8f6b))
* **example:** Remove log of user input ([24c97a0](24c97a0))
* **examples:** Add Hono + Node.js example ([#538](#538)) ([e0e84c8](e0e84c8))
* **examples:** Added new Next.js + React Hook Form example ([#559](#559)) ([b0a13a4](b0a13a4))
* **examples:** Remove log of user input ([#525](#525)) ([24c97a0](24c97a0))
* **examples:** Update examples app deploy button ([#612](#612)) ([999e1bb](999e1bb))
</details>

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add shield rule
2 participants