generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 82
[Serving] Implement SageMaker Secure Mode & support for multiple data sources #2042
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
Merged
sindhuvahinis
merged 29 commits into
deepjavalibrary:master
from
ethnzhng:sm-security-controls
Jun 13, 2024
Merged
[Serving] Implement SageMaker Secure Mode & support for multiple data sources #2042
sindhuvahinis
merged 29 commits into
deepjavalibrary:master
from
ethnzhng:sm-security-controls
Jun 13, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Basic support for Additional Model Data Sources - Specify trusted and untrusted data source paths - Configure individual DLC-level security controls which scan untrusted paths
lanking520
reviewed
Jun 10, 2024
frankfliu
reviewed
Jun 10, 2024
frankfliu
reviewed
Jun 12, 2024
plugins/secure-mode-plugin/src/main/resources/META-INF/plugin.definition
Outdated
Show resolved
Hide resolved
...de-plugin/src/main/java/ai/djl/serving/plugins/securemode/SecureModeModelServerListener.java
Outdated
Show resolved
Hide resolved
...de-plugin/src/main/java/ai/djl/serving/plugins/securemode/SecureModeModelServerListener.java
Outdated
Show resolved
Hide resolved
...de-plugin/src/main/java/ai/djl/serving/plugins/securemode/SecureModeModelServerListener.java
Outdated
Show resolved
Hide resolved
plugins/secure-mode-plugin/src/main/java/ai/djl/serving/plugins/securemode/SecureModeUtils.java
Outdated
Show resolved
Hide resolved
plugins/secure-mode-plugin/src/main/java/ai/djl/serving/plugins/securemode/SecureModeUtils.java
Show resolved
Hide resolved
plugins/secure-mode-plugin/src/main/java/ai/djl/serving/plugins/securemode/SecureModeUtils.java
Outdated
Show resolved
Hide resolved
plugins/secure-mode-plugin/src/main/java/ai/djl/serving/plugins/securemode/SecureModeUtils.java
Outdated
Show resolved
Hide resolved
plugins/secure-mode-plugin/src/main/java/ai/djl/serving/plugins/securemode/SecureModeUtils.java
Outdated
Show resolved
Hide resolved
frankfliu
reviewed
Jun 12, 2024
...secure-mode-plugin/src/test/java/ai/djl/serving/plugins/securemode/SecureModePluginTest.java
Show resolved
Hide resolved
...secure-mode-plugin/src/test/java/ai/djl/serving/plugins/securemode/SecureModePluginTest.java
Outdated
Show resolved
Hide resolved
...secure-mode-plugin/src/test/java/ai/djl/serving/plugins/securemode/SecureModePluginTest.java
Outdated
Show resolved
Hide resolved
...ins/secure-mode-plugin/src/main/java/ai/djl/serving/plugins/securemode/SecureModePlugin.java
Outdated
Show resolved
Hide resolved
frankfliu
reviewed
Jun 12, 2024
lanking520
approved these changes
Jun 13, 2024
sindhuvahinis
pushed a commit
to sindhuvahinis/djl-serving
that referenced
this pull request
Jun 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This draft PR adds the initial implementation of SageMaker Secure Mode, as well as support for multiple data sources.
I have tested the security control scenarios locally in Docker, and am currently working on adding unit tests and integration tests.
Summary of functionality
Basic support for additional model data sources
requirements.txts found in trusted additional data sources.serving.propertiesfound in the main model directory/opt/ml/modelis applied (same as existing behavior). In the scope of this PR,serving.propertiesfound in other data sources are ignored.Specify trusted and untrusted data source paths
/opt/ml/modelcan be designated as trusted or untrusted by SM platform.Configure individual DLC-level security controls which scan untrusted paths
requirements.txt– check forrequirements.txtfiletrust_remote_code– check if this option is set via env vars or untrustedserving.propertiesserving.propertiescan only set entryPoint to built-in modules e.g.djl_python.. Trustedserving.propertiescan set to anything.chat_template– check if this field is set intokenizer_config.jsonfileExample scenarios: