mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 04:18:34 +00:00
fix(security): hide notification secrets from non-admins
Prevent users without update permission from reading notification credentials and manual webhook secrets in Livewire state or rendered forms.
This commit is contained in:
1 parent
062ad57740
commit
5973bb4d4f
14 files changed
+219
-45
No files matched your search
@@ -26,9 +26,15 @@
|
||||
helper="If enabled, a ping (@here) will be sent to the notification when a critical event happens."
|
||||
label="Ping Enabled" />
|
||||
</div>
|
||||
<x-forms.input canGate="update" :canResource="$settings" type="password"
|
||||
helper="Create a Discord Server and generate a Webhook URL. <br><a class='inline-block underline dark:text-white' href='https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks' target='_blank'>Webhook Documentation</a>"
|
||||
required id="discordWebhookUrl" label="Webhook" />
|
||||
@can('update', $settings)
|
||||
<x-forms.input type="password"
|
||||
helper="Create a Discord Server and generate a Webhook URL. <br><a class='inline-block underline dark:text-white' href='https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks' target='_blank'>Webhook Documentation</a>"
|
||||
required id="discordWebhookUrl" label="Webhook" />
|
||||
@else
|
||||
<x-forms.input disabled
|
||||
helper="Create a Discord Server and generate a Webhook URL. <br><a class='inline-block underline dark:text-white' href='https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks' target='_blank'>Webhook Documentation</a>"
|
||||
required label="Webhook" value="Hidden (only admins can view)" />
|
||||
@endcan
|
||||
</form>
|
||||
<h2 class="mt-4">Notification Settings</h2>
|
||||
<p class="mb-4">
|
||||
|
||||
@@ -24,12 +24,21 @@
|
||||
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="instantSavePushoverEnabled" id="pushoverEnabled" label="Enabled" />
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input canGate="update" :canResource="$settings" type="password"
|
||||
helper="Get your User Key in Pushover. You need to be logged in to Pushover to see your user key in the top right corner. <br><a class='inline-block underline dark:text-white' href='https://pushover.net/' target='_blank'>Pushover Dashboard</a>"
|
||||
required id="pushoverUserKey" label="User Key" />
|
||||
<x-forms.input canGate="update" :canResource="$settings" type="password"
|
||||
helper="Generate an API Token/Key in Pushover by creating a new application. <br><a class='inline-block underline dark:text-white' href='https://pushover.net/apps/build' target='_blank'>Create Pushover Application</a>"
|
||||
required id="pushoverApiToken" label="API Token" />
|
||||
@can('update', $settings)
|
||||
<x-forms.input type="password"
|
||||
helper="Get your User Key in Pushover. You need to be logged in to Pushover to see your user key in the top right corner. <br><a class='inline-block underline dark:text-white' href='https://pushover.net/' target='_blank'>Pushover Dashboard</a>"
|
||||
required id="pushoverUserKey" label="User Key" />
|
||||
<x-forms.input type="password"
|
||||
helper="Generate an API Token/Key in Pushover by creating a new application. <br><a class='inline-block underline dark:text-white' href='https://pushover.net/apps/build' target='_blank'>Create Pushover Application</a>"
|
||||
required id="pushoverApiToken" label="API Token" />
|
||||
@else
|
||||
<x-forms.input disabled
|
||||
helper="Get your User Key in Pushover. You need to be logged in to Pushover to see your user key in the top right corner. <br><a class='inline-block underline dark:text-white' href='https://pushover.net/' target='_blank'>Pushover Dashboard</a>"
|
||||
required label="User Key" value="Hidden (only admins can view)" />
|
||||
<x-forms.input disabled
|
||||
helper="Generate an API Token/Key in Pushover by creating a new application. <br><a class='inline-block underline dark:text-white' href='https://pushover.net/apps/build' target='_blank'>Create Pushover Application</a>"
|
||||
required label="API Token" value="Hidden (only admins can view)" />
|
||||
@endcan
|
||||
</div>
|
||||
</form>
|
||||
<h2 class="mt-4">Notification Settings</h2>
|
||||
|
||||
@@ -23,9 +23,15 @@
|
||||
<div class="w-32">
|
||||
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="instantSaveSlackEnabled" id="slackEnabled" label="Enabled" />
|
||||
</div>
|
||||
<x-forms.input canGate="update" :canResource="$settings" type="password"
|
||||
helper="Create a Slack APP and generate a Incoming Webhook URL. <br><a class='inline-block underline dark:text-white' href='https://api.slack.com/apps' target='_blank'>Create Slack APP</a>"
|
||||
required id="slackWebhookUrl" label="Webhook" />
|
||||
@can('update', $settings)
|
||||
<x-forms.input type="password"
|
||||
helper="Create a Slack APP and generate a Incoming Webhook URL. <br><a class='inline-block underline dark:text-white' href='https://api.slack.com/apps' target='_blank'>Create Slack APP</a>"
|
||||
required id="slackWebhookUrl" label="Webhook" />
|
||||
@else
|
||||
<x-forms.input disabled
|
||||
helper="Create a Slack APP and generate a Incoming Webhook URL. <br><a class='inline-block underline dark:text-white' href='https://api.slack.com/apps' target='_blank'>Create Slack APP</a>"
|
||||
required label="Webhook" value="Hidden (only admins can view)" />
|
||||
@endcan
|
||||
</form>
|
||||
<h2 class="mt-4">Notification Settings</h2>
|
||||
<p class="mb-4">
|
||||
|
||||
@@ -24,12 +24,21 @@
|
||||
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="instantSaveTelegramEnabled" id="telegramEnabled" label="Enabled" />
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input canGate="update" :canResource="$settings" type="password" autocomplete="new-password"
|
||||
helper="Get it from the <a class='inline-block underline dark:text-white' href='https://t.me/botfather' target='_blank'>BotFather Bot</a> on Telegram."
|
||||
required id="telegramToken" label="Bot API Token" />
|
||||
<x-forms.input canGate="update" :canResource="$settings" type="password" autocomplete="new-password"
|
||||
helper="Add your bot to a group chat and add its Chat ID here." required id="telegramChatId"
|
||||
label="Chat ID" />
|
||||
@can('update', $settings)
|
||||
<x-forms.input type="password" autocomplete="new-password"
|
||||
helper="Get it from the <a class='inline-block underline dark:text-white' href='https://t.me/botfather' target='_blank'>BotFather Bot</a> on Telegram."
|
||||
required id="telegramToken" label="Bot API Token" />
|
||||
<x-forms.input type="password" autocomplete="new-password"
|
||||
helper="Add your bot to a group chat and add its Chat ID here." required id="telegramChatId"
|
||||
label="Chat ID" />
|
||||
@else
|
||||
<x-forms.input disabled autocomplete="new-password"
|
||||
helper="Get it from the <a class='inline-block underline dark:text-white' href='https://t.me/botfather' target='_blank'>BotFather Bot</a> on Telegram."
|
||||
required label="Bot API Token" value="Hidden (only admins can view)" />
|
||||
<x-forms.input disabled autocomplete="new-password"
|
||||
helper="Add your bot to a group chat and add its Chat ID here." required label="Chat ID"
|
||||
value="Hidden (only admins can view)" />
|
||||
@endcan
|
||||
</div>
|
||||
</form>
|
||||
<h2 class="mt-4">Notification Settings</h2>
|
||||
|
||||
@@ -28,9 +28,15 @@
|
||||
</div>
|
||||
<div class="flex items-end gap-2">
|
||||
|
||||
<x-forms.input canGate="update" :canResource="$settings" type="password"
|
||||
helper="Enter a valid HTTP or HTTPS URL. Coolify will send POST requests to this endpoint when events occur."
|
||||
required id="webhookUrl" label="Webhook URL (POST)" />
|
||||
@can('update', $settings)
|
||||
<x-forms.input type="password"
|
||||
helper="Enter a valid HTTP or HTTPS URL. Coolify will send POST requests to this endpoint when events occur."
|
||||
required id="webhookUrl" label="Webhook URL (POST)" />
|
||||
@else
|
||||
<x-forms.input disabled
|
||||
helper="Enter a valid HTTP or HTTPS URL. Coolify will send POST requests to this endpoint when events occur."
|
||||
required label="Webhook URL (POST)" value="Hidden (only admins can view)" />
|
||||
@endcan
|
||||
</div>
|
||||
</form>
|
||||
<h2 class="mt-4">Notification Settings</h2>
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
helper="Need to set a secret to be able to use this webhook. It should match with the secret in GitHub."
|
||||
label="GitHub Webhook Secret" id="githubManualWebhookSecret"></x-forms.input>
|
||||
@else
|
||||
<x-forms.input disabled type="password"
|
||||
<x-forms.input disabled
|
||||
helper="Need to set a secret to be able to use this webhook. It should match with the secret in GitHub."
|
||||
label="GitHub Webhook Secret" id="githubManualWebhookSecret"></x-forms.input>
|
||||
label="GitHub Webhook Secret" value="Hidden (only admins can view)"></x-forms.input>
|
||||
@endcan
|
||||
</div>
|
||||
<a target="_blank" class="flex hover:no-underline" href="{{ $resource?->gitWebhook }}">
|
||||
@@ -39,9 +39,9 @@
|
||||
helper="Need to set a secret to be able to use this webhook. It should match with the secret in GitLab."
|
||||
label="GitLab Webhook Secret" id="gitlabManualWebhookSecret"></x-forms.input>
|
||||
@else
|
||||
<x-forms.input disabled type="password"
|
||||
<x-forms.input disabled
|
||||
helper="Need to set a secret to be able to use this webhook. It should match with the secret in GitLab."
|
||||
label="GitLab Webhook Secret" id="gitlabManualWebhookSecret"></x-forms.input>
|
||||
label="GitLab Webhook Secret" value="Hidden (only admins can view)"></x-forms.input>
|
||||
@endcan
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
@@ -51,9 +51,9 @@
|
||||
helper="Need to set a secret to be able to use this webhook. It should match with the secret in Bitbucket."
|
||||
label="Bitbucket Webhook Secret" id="bitbucketManualWebhookSecret"></x-forms.input>
|
||||
@else
|
||||
<x-forms.input disabled type="password"
|
||||
<x-forms.input disabled
|
||||
helper="Need to set a secret to be able to use this webhook. It should match with the secret in Bitbucket."
|
||||
label="Bitbucket Webhook Secret" id="bitbucketManualWebhookSecret"></x-forms.input>
|
||||
label="Bitbucket Webhook Secret" value="Hidden (only admins can view)"></x-forms.input>
|
||||
@endcan
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
@@ -63,9 +63,9 @@
|
||||
helper="Need to set a secret to be able to use this webhook. It should match with the secret in Gitea."
|
||||
label="Gitea Webhook Secret" id="giteaManualWebhookSecret"></x-forms.input>
|
||||
@else
|
||||
<x-forms.input disabled type="password"
|
||||
<x-forms.input disabled
|
||||
helper="Need to set a secret to be able to use this webhook. It should match with the secret in Gitea."
|
||||
label="Gitea Webhook Secret" id="giteaManualWebhookSecret"></x-forms.input>
|
||||
label="Gitea Webhook Secret" value="Hidden (only admins can view)"></x-forms.input>
|
||||
@endcan
|
||||
</div>
|
||||
@can('update', $resource)
|
||||
|
||||
Reference in new issue
Block a user