You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: translations/pt-BR/content/developers/webhooks-and-events/securing-your-webhooks.md
+20-19Lines changed: 20 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: Protegendo seus webhooks
3
-
intro: 'Certifique-se de que seu servidor só esteja recebendo as solicitações esperadas do {% data variables.product.prodname_dotcom %} por motivos de segurança.'
2
+
title: Securing your webhooks
3
+
intro: 'Ensure your server is only receiving the expected {% data variables.product.prodname_dotcom %} requests for security reasons.'
4
4
redirect_from:
5
5
- /webhooks/securing
6
6
versions:
@@ -11,41 +11,42 @@ versions:
11
11
12
12
13
13
14
-
Assim que seu servidor estiver configurado para receber cargas, ele ouvirá qualquer carga enviada para o ponto de extremidade que você configurou. Por motivos de segurança, você provavelmente vai querer limitar os pedidos para aqueles provenientes do GitHub. Existem algumas maneiras de fazer isso. Você poderia, por exemplo, optar por permitir solicitações do endereço IP do GitHub. No entanto, um método muito mais fácil é configurar um token secreto e validar a informação.
14
+
Once your server is configured to receive payloads, it'll listen for any payload sent to the endpoint you configured. For security reasons, you probably want to limit requests to those coming from GitHub. There are a few ways to go about this--for example, you could opt to allow requests from GitHub's IP address--but a far easier method is to set up a secret token and validate the information.
15
15
16
16
{% data reusables.webhooks.webhooks-rest-api-links %}
17
17
18
-
### Definir seu token secreto
18
+
### Setting your secret token
19
19
20
-
Você precisará configurar seu token secreto em dois lugares: no GitHub e no seu servidor.
20
+
You'll need to set up your secret token in two places: GitHub and your server.
21
21
22
-
Para definir seu token no GitHub:
22
+
To set your token on GitHub:
23
23
24
-
1. Navegue até o repositório onde você está configurando seu webhook.
25
-
2. Preencha a caixa de texto do segredo. Use uma string aleatória com alta entropia (por exemplo, pegando a saída de `ruby -rsecurerandom -e 'puts SecureRandom.hex(20)'` no terminal). 
26
-
3. Clique em **Atualizar o webhook**.
24
+
1. Navigate to the repository where you're setting up your webhook.
25
+
2. Fill out the Secret textbox. Use a random string with high entropy (e.g., by taking the output of `ruby -rsecurerandom -e 'puts SecureRandom.hex(20)'` at the terminal).
Em seguida, configure uma variável de ambiente em seu servidor que armazene este token. Normalmente, isso é tão simples quanto executar:
29
+
Next, set up an environment variable on your server that stores this token. Typically, this is as simple as running:
29
30
30
31
```shell
31
32
$ export SECRET_TOKEN=<em>your_token</em>
32
33
```
33
34
34
-
**Nunca**pré-programe o token no seu aplicativo!
35
+
**Never**hardcode the token into your app!
35
36
36
-
### Validar cargas do GitHub
37
+
### Validating payloads from GitHub
37
38
38
-
Quando seu token secreto está definido, {% data variables.product.product_name %} o utiliza para criar uma assinatura de hash com cada carga. Esta assinatura hash está incluída com os cabeçalhos de cada solicitação como {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2. 2" ou currentVersion == "github-ae@latest" %}`X-Hub-Signature-256`{% elsif currentVersion ver_lt "enterprise-server@2.23" %}`X-Hub-Signature`{% endif %}.
39
+
When your secret token is set, {% data variables.product.product_name %} uses it to create a hash signature with each payload. This hash signature is included with the headers of each request as {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" or currentVersion == "github-ae@latest" %}`X-Hub-Signature-256`{% elsif currentVersion ver_lt "enterprise-server@2.23" %}`X-Hub-Signature`{% endif %}.
39
40
40
41
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
41
42
{% note %}
42
43
43
-
**Observação:**Para compatibilidade com versões anteriores, também incluímos o cabeçalho`X-Hub-Signature`gerado usando a função de hash SHA-1. Se possível, recomendamos que você use o cabeçalho `X-Hub-Signature-256`para melhorar a segurança. O exemplo abaixo demonstra o uso do cabeçalho `X-Hub-Signature-256`.
44
+
**Note:**For backward-compatibility, we also include the`X-Hub-Signature`header that is generated using the SHA-1 hash function. If possible, we recommend that you use the `X-Hub-Signature-256`header for improved security. The example below demonstrate using the `X-Hub-Signature-256` header.
44
45
45
46
{% endnote %}
46
47
{% endif %}
47
48
48
-
Por exemplo, se você tem um servidor básico que ouve webhooks, ele poderá ser configurado de forma semelhante a isso:
49
+
For example, if you have a basic server that listens for webhooks, it might be configured similar to this:
49
50
50
51
```ruby
51
52
require'sinatra'
@@ -57,7 +58,7 @@ post '/payload' do
57
58
end
58
59
```
59
60
60
-
O objetivo é calcular um hash usando seu`SECRET_TOKEN` e garantir que o resultado corresponda ao hash de {% data variables.product.product_name %}. {% data variables.product.product_name %} usa um resumo hexadecimal HMAC para calcular o hash. Portanto, você pode reconfigurar o seu servidor para que se pareça mais ou menos assim:
61
+
The intention is to calculate a hash using your`SECRET_TOKEN`, and ensure that the result matches the hash from {% data variables.product.product_name %}. {% data variables.product.product_name %} uses an HMAC hex digest to compute the hash, so you could reconfigure your server to look a little like this:
A sua linguagem e implementações do servidor podem ser diferentes deste código de exemplo. No entanto, há uma série de aspectos muito importantes a destacar:
83
+
Your language and server implementations may differ from this example code. However, there are a number of very important things to point out:
83
84
84
-
* Não importa qual implementação você usar, a assinatura hash começa com {% if currentVersion == "free-pro-team@latest" ou currentVersion ver_gt "enterprise-server@2. 2" or "github-ae@latest" %}`sha256=`{%elsif currentVersion ver_lt "enterprise-server@2. 3"%}`sha1=`{% endif %}, usando a chave do seu token secreto e o seu texto de carga.
85
+
* No matter which implementation you use, the hash signature starts with {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" or "github-ae@latest" %}`sha256=`{%elsif currentVersion ver_lt "enterprise-server@2.23"%}`sha1=`{% endif %}, using the key of your secret token and your payload body.
85
86
86
-
*Não **se recomenda** usar um operador simples de`==`. Um método como [`secure_compare`][secure_compare] executa uma comparação de strings "tempo constante", o que ajuda a mitigar certos ataques de tempo contra operadores de igualdade regular.
87
+
*Using a plain `==` operator is **not advised**. A method like [`secure_compare`][secure_compare] performs a "constant time" string comparison, which helps mitigate certain timing attacks against regular equality operators.
Copy file name to clipboardExpand all lines: translations/pt-BR/content/github/authenticating-to-github/index.md
+4-16Lines changed: 4 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: Autenticar com o GitHub
3
-
shortTitle: Autenticação
4
-
intro: 'Mantenha sua conta e dados protegidos com recursos como {% if currentVersion != "github-ae@latest" %}autenticação de dois fatores, {% endif %}SSH{% if currentVersion ! "github-ae@latest" %},{% endif %} e verificação de assinatura do commit.'
2
+
title: Authenticating to GitHub
3
+
shortTitle: Authentication
4
+
intro: 'Keep your account and data secure with features like {% if currentVersion != "github-ae@latest" %}two-factor authentication, {% endif %}SSH{% if currentVersion != "github-ae@latest" %},{% endif %} and commit signature verification.'
intro: 'As credenciais de {% data variables.product.product_name %} incluem{% if currentVersion ! "github-ae@latest" %} não apenas sua senha, mas também{% endif %} os tokens de acesso, Chaves SSH e tokens do aplicativo da API que você usa para se comunicar com {% data variables.product.product_name %}. Se houver necessidade, você mesmo pode redefinir todas essas credenciais de acesso.'
2
+
title: Updating your GitHub access credentials
3
+
intro: '{% data variables.product.product_name %} credentials include{% if currentVersion != "github-ae@latest" %} not only your password, but also{% endif %} the access tokens, SSH keys, and application API tokens you use to communicate with {% data variables.product.product_name %}. Should you have the need, you can reset all of these access credentials yourself.'
4
4
redirect_from:
5
5
- /articles/rolling-your-credentials/
6
6
- /articles/how-can-i-reset-my-password/
@@ -12,49 +12,51 @@ versions:
12
12
---
13
13
14
14
{% if currentVersion != "github-ae@latest" %}
15
-
### Solicitar uma nova senha
15
+
### Requesting a new password
16
16
17
-
1. Para solicitar uma nova senha, acesse {% if currentVersion == "free-pro-team@latest" %}https://{% data variables.product.product_url %}/password_reset{% else %}`https://{% data variables.product.product_url %}/password_reset`{% endif %}.
18
-
2. Digite o endereço de e-mail associado à sua conta pessoal do {% data variables.product.product_name %} e clique em **Send password reset email** (Enviar e-mail de redefinição de senha). O e-mail será enviado para o endereço de e-mail de backup, se você tiver um configurado. 
19
-
3. Nós enviaremos por e-mail um link para você redefinir sua senha. Clique nele em até 3 horas após o recebimento do e-mail. Se você não receber o e-mail com o link, verifique sua pasta de spam.
20
-
4. Depois de clicar no link contido no e-mail, você precisará digitar uma nova senha.
17
+
1. To request a new password, visit {% if currentVersion == "free-pro-team@latest" %}https://{% data variables.product.product_url %}/password_reset{% else %}`https://{% data variables.product.product_url %}/password_reset`{% endif %}.
18
+
2. Enter the email address associated with your personal {% data variables.product.product_name %} account, then click **Send password reset email.** The email will be sent to the backup email address if you have one configured.
3. We'll email you a link that will allow you to reset your password. You must click on this link within 3 hours of receiving the email. If you didn't receive an email from us, make sure to check your spam folder.
21
+
4. After clicking on the link in your email, you'll be asked to enter a new password.
Para evitar que você perca a senha, sugerimos que você use um gerenciador de senhas seguras, como[LastPass](https://lastpass.com/), [1Password](https://1password.com/), ou[Keeper](https://keepersecurity.com/).
26
+
To avoid losing your password in the future, we suggest using a secure password manager, like[LastPass](https://lastpass.com/), [1Password](https://1password.com/), or[Keeper](https://keepersecurity.com/).
25
27
26
28
{% endtip %}
27
29
28
-
### Alterar uma senha existente
30
+
### Changing an existing password
29
31
30
32
{% data reusables.repositories.blocked-passwords %}
31
33
32
-
1. {% data variables.product.signin_link %} para o {% data variables.product.product_name %}.
34
+
1. {% data variables.product.signin_link %} to {% data variables.product.product_name %}.
33
35
{% data reusables.user_settings.access_settings %}
34
36
{% data reusables.user_settings.security %}
35
-
4.Em "Change password" (Alterar senha), insira a senha antiga, digite uma nova senha forte e confirme a nova senha. Consulte "[Criar uma senha forte](/articles/creating-a-strong-password)" para obter ajuda sobre esse assunto.
36
-
5.Clique em **Update password** (Atualizar senha).
37
+
4.Under "Change password", type your old password, a strong new password, and confirm your new password. For help creating a strong password, see "[Creating a strong password](/articles/creating-a-strong-password)"
38
+
5.Click **Update password**.
37
39
38
40
{% tip %}
39
41
40
-
Para maior segurança, além de alterar a senha, habilite também a autenticação de dois fatores. Consulte [Sobre a autenticação de dois fatores](/articles/about-two-factor-authentication)para ver mais detalhes.
42
+
For greater security, enable two-factor authentication in addition to changing your password. See [About two-factor authentication](/articles/about-two-factor-authentication)for more details.
41
43
42
44
{% endtip %}
43
45
{% endif %}
44
-
### Atualizar tokens de acesso
46
+
### Updating your access tokens
45
47
46
-
Consulte "[Revisar integrações autorizadas](/articles/reviewing-your-authorized-integrations)" para ver instruções sobre como revisar e excluir tokens de acesso. Para gerar novos tokens de acesso, consulte "[Criar um token de acesso pessoal](/github/authenticating-to-github/creating-a-personal-access-token)."
48
+
See "[Reviewing your authorized integrations](/articles/reviewing-your-authorized-integrations)" for instructions on reviewing and deleting access tokens. To generate new access tokens, see "[Creating a personal access token](/github/authenticating-to-github/creating-a-personal-access-token)."
47
49
48
-
### Atualizar chaves SSH
50
+
### Updating your SSH keys
49
51
50
-
Consulte "[Revisar as chaves SSH](/articles/reviewing-your-ssh-keys)" para ver instruções sobre como revisar e excluir chaves SSH. Para gerar e adicionar novas chaves SSH, consulte "[Gerar uma chave SSH](/articles/generating-an-ssh-key)".
52
+
See "[Reviewing your SSH keys](/articles/reviewing-your-ssh-keys)" for instructions on reviewing and deleting SSH keys. To generate and add new SSH keys, see "[Generating an SSH key](/articles/generating-an-ssh-key)."
51
53
52
-
### Redefinir tokens da API
54
+
### Resetting API tokens
53
55
54
-
Se você tiver algum aplicativo registrado no {% data variables.product.product_name %}, talvez precise redefinir os tokens OAuth dele. Para obter mais informações, consulte o ponto de extremidade "[Redefinir uma autorização](/rest/reference/apps#reset-an-authorization)".
56
+
If you have any applications registered with {% data variables.product.product_name %}, you'll want to reset their OAuth tokens. For more information, see the "[Reset an authorization](/rest/reference/apps#reset-an-authorization)" endpoint.
55
57
56
58
{% if currentVersion != "github-ae@latest" %}
57
-
### Impedir acesso não autorizado
59
+
### Preventing unauthorized access
58
60
59
-
Consulte "[Impedir acesso não autorizado](/articles/preventing-unauthorized-access)" para obter mais dicas sobre como proteger a conta e impedir acesso não autorizado.
61
+
For more tips on securing your account and preventing unauthorized access, see "[Preventing unauthorized access](/articles/preventing-unauthorized-access)."
0 commit comments