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: export with fixed-api-key #10833

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dajianguo
Copy link
Contributor

@dajianguo dajianguo commented Nov 19, 2024

Summary

A fixed api-key keeps the api-key of app services unchanged when we import, export or upgrade the dsl.

Resolves #10632
Resolves #9559

Screenshots

image image
test-app-apikey:
image
test-app-apikey:
image
test-dataset-appkey:
image
test-pk-check:
image
test-api:
image
test-api:
image

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. ☕️ typescript Pull request that update TypeScript code. 💪 enhancement New feature or request labels Nov 19, 2024
@crazywoola crazywoola changed the title feat: feat_A-fixed-api-key-#10632 feat: export with fixed-api-key Nov 19, 2024
@laipz8200
Copy link
Collaborator

I don’t recommend doing this, as allowing custom keys is more likely to lead to security issues due to negligence.

@dajianguo
Copy link
Contributor Author

dajianguo commented Nov 22, 2024

I don’t recommend doing this, as allowing custom keys is more likely to lead to security issues due to negligence.

Add verification, the key length must not be less than 20 bits?

We use dify as the backend service, which is deployed in the intranet and is not open to the public, so it is relatively safe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files. ☕️ typescript Pull request that update TypeScript code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A fixed api-key Support "API Secret key" custom assign
2 participants