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

[error] file '~/.awless/aws/rdf/client-name/global/access.nt': bufio.Scanner: token too long #8

Open
krestivo-kdinfotech opened this issue Nov 29, 2021 · 0 comments

Comments

@krestivo-kdinfotech
Copy link

krestivo-kdinfotech commented Nov 29, 2021

This bug in awless: wallix/awless#300 appears to maybe come from triplestore?

Happens consistently, deleting the file does not make the problem go away.

Does not happen on list operations, only on show operations

The frequency of occurrence of the longest lines is:

([65984 1]
 [8847 1]
 [7199 1]
 [6412 1]
 [5310 1]
 [4310 1]
 [3796 1]
 [2722 1]
 [2719 1]
 [2718 1]
 [2609 1]
 [2487 1]

And that 65984 size tells me somewhere you have a hardcoded 65535 16-bit int limit.

The offending line appears to begin with:

"<ANPAJ7W6266ELXF5MISDS> <cloud:document> \"{\"Statement\":[{\"Action\":[\"apigateway:GET\"],\"Effect\":\"Allow\",\"Resource\":[\"arn:aws:apigateway:*::/account\",\"arn:aws:apigateway:*::/apis\",\"arn:aws:apigateway:*::/apis/*\",\"arn:aws:apigateway:*::/apis/*/authorizers\",\"arn:aws:apigateway:*::/apis/*/authorizers/*\",\"arn:aws:apigateway:*::/apis/*/deployments\",\"arn:aws:apigateway:*::/apis/*/deployments/*\",\"arn:aws:apigateway:*::/apis/*/integrations\",\"arn:aws:apigateway:*::/apis/*/integrations/*\",\"arn:aws:apigateway:*::/apis/*/integrations/*/integrationresponses\",\"arn:aws:apigateway:*::/apis/*/integrations/*/integrationresponses/*\",\"arn:aws:apigateway:*::/apis/*/models\",\"arn:aws:apigateway:*::/apis/*/models/*\",\"arn:aws:apigateway:*::/apis/*/routes\",\"arn:aws:apigateway:*::/apis/*/routes/*\",\"arn:aws:apigateway:*::/apis/*/routes/*/routeresponses\",\"arn:aws:apigateway:*::/apis/*/routes/*/routeresponses/*\",\"arn:aws:apigateway:*::/apis/*/stages\",\"arn:aws:apigateway:*::/apis/*/stages/*\",\"arn:aws:apigateway:*::/clientcertificates\",\"arn:aws:apigateway:*::/clientcertificates/*\",\"arn:aws:apigateway:*::/domainnames\",\"arn:aws:apigateway:*::/domainnames/*\",\"arn:aws:apigateway:*::/domainnames/*/apimappings\",\"arn:aws:apigateway:*::/domainnames/*/apimappings/*\",\"arn:aws:apigateway:*::/domainnames/*/basepathmappings\",\"arn:aws:apigateway:*::/domainnames/*/basepathmappings/*\",\"arn:aws:apigateway:*::/restapis\",\"arn:aws:apigateway:*::/restapis/*\",\"arn:aws:apigateway:*::/restapis/*/authorizers\",\"arn:aws:apigateway:*::/restapis/*/authorizers/*\",\"arn:aws:apigateway:*::/restapis/*/deployments\",\"arn:aws:apigateway:*::/restapis/*/deployments/*\",\"arn:aws:apigateway:*::/restapis/*/models\",\"arn:aws:apigateway:*::/restapis/*/models/*\",\"arn:aws:apigateway:*::/restapis/*/models/*/default_template\",\"arn:aws:apigateway:*::/restapis/*/resources\",\"arn:aws:apigateway:*::/restapis/*/resources/*\",\"arn:aws:apigateway:*::/restapis/*/resources/*/methods/*/integration/responses/*\",\"arn:aws:apigateway:*::/restapis/*/resources/*/methods/*/responses/*\",\"arn:aws:apigateway:*::/restapis/*/stages/*/sdks/*\",\"arn:aws:apigateway:*::/restapis/*/resources/*/methods/*\",\"arn:aws:apigateway:*::/restapis/*/resources/*/methods/*/integration\",\"arn:aws:apigateway:*::/restapis/*/stages\",\"arn:aws:apigateway:*::/restapis/*/stages/*\"]},{\"Action\":[\"iam:DeleteRole\"],\"Effect\":\"Allow\",\"Resource\":[\"arn:aws:iam::*:role/aws-service-role/support.amazonaws.com/AWSServiceRoleForSupport\"]},{\"Action\":[\"a4b:getDevice\",\"a4b:getProfile\",\"a4b:getRoom\",\"a4b:getRoomSkillParameter\",\"a4b:getSkillGroup\",\"a4b:searchDevices\",\"a4b:searchProfiles\",\"a4b:searchRooms\",\"a4b:searchSkillGroups\",\"access-analyzer:getFinding\",\"access-analyzer:listAnalyzers\",\"access-analyzer:listArchiveRules\",\"access-analyzer:listFindings\",\"acm-pca:describeCertificateAuthority\",\"acm-pca:describeCertificateAuthorityAuditReport\",\"acm-pca:getCertificate\",\"acm-pca:getCertificateAuthorityCertificate\",\"acm-pca:getCertificateAuthorityCsr\",\"acm-pca:listCertificateAuthorities\",\"acm-pca:listTags\",\"acm:describeCertificate\",\"acm:getCertificate\",\"acm:listCertificates\",\"acm:listTagsForCertificate\",\"airflow:getEnvironment\",\"airflow:listEnvironments\",\"airflow:listTagsForResource\",\"amplify:getApp\",\"amplify:getBranch\",\"amplify:getDomainAssociation\",\"amplify:getJob\",\"amplify:getWebhoo

and other than being huge, seems like a valid line.

elkargig added a commit to elkargig/awless that referenced this issue Feb 9, 2022
Fixes `[error] file '~/.awless/aws/rdf/client-name/global/access.nt': bufio.Scanner: token too long`

Related: wallix#300
Related: wallix/triplestore#8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant