Closed nijel closed 1 month ago
Sentry Issue: WEBLATE-SRS
Liberapay's AWS token for Weblate had the AWS-managed TranslateReadOnly
permission, defined as:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"translate:TranslateText",
"translate:TranslateDocument",
"translate:GetTerminology",
"translate:ListTerminologies",
"translate:ListTextTranslationJobs",
"translate:DescribeTextTranslationJob",
"translate:GetParallelData",
"translate:ListParallelData",
"comprehend:DetectDominantLanguage",
"cloudwatch:GetMetricStatistics",
"cloudwatch:ListMetrics"
],
"Resource": "*"
}
]
}
I have now replaced it with the following custom policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"translate:ListTextTranslationJobs",
"translate:GetTerminology",
"translate:ListTagsForResource",
"translate:ListTerminologies",
"translate:ListLanguages",
"translate:GetParallelData",
"comprehend:DetectDominantLanguage",
"translate:TranslateText",
"translate:DescribeTextTranslationJob",
"translate:ListParallelData",
"translate:TranslateDocument"
],
"Resource": "*"
}
]
}
Let me know if that works.
Yes, it works for translating (you can verify it yourself that saving https://hosted.weblate.org/machinery/liberapay/aws/ does not yield an error), but will probably fail for glossary sync. And thanks for providing the policy name, I was able to find the docs on that now: https://docs.aws.amazon.com/aws-managed-policy/latest/reference/TranslateFullAccess.html
Anyway, for glossary sync, Weblate will need TranslateFullAccess
(or custom permission including at least translate:ListTerminologies
, translate:ImportTerminology
and translate:DeleteTerminology
).
Now I can see two approaches to address this:
TranslateFullAccess
policy and let users deal with the failures.I think requiring full access is a better approach as users will know that something is misconfigured, the silently ignored errors in second approach will make the change invisible.
@nijel What is the best way to inform users of the additional permission requirement beyond updating the documentation ?
Mention this in compatibility section in the changes.
Thank you for your report; the issue you have reported has just been fixed.
Describe the issue
Since https://github.com/WeblateOrg/weblate/pull/12520 Amazon Translate no longer works for some credentials.
I already tried
Steps to reproduce the behavior
Expected behavior
No response
Screenshots
No response
Exception traceback
How do you run Weblate?
weblate.org service
Weblate versions
No response
Weblate deploy checks
No response
Additional context
@gersona This is a regression introduced by https://github.com/WeblateOrg/weblate/pull/12520. I'm not sure if we should work around this by falling back to a previously hard-coded list of languages, or tell users to adjust permissions. The similar issue might exist for glossary manipulation.
@Changaco This is why Amazon Translate is not working on the LibreTranslate project in Weblate. Can you please check permissions for the token? It appears to be able to translate, but not list supported languages.