-
Notifications
You must be signed in to change notification settings - Fork 8
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
Model Access Denied from AWS Services #609
Comments
This is a generic Smithy gap: there are errors that could be modeled that are a result of platform error cases, such as access denied because of the authentication mechanism necessary to call an AWS service. It affects codegen for AWS SDKs as well and there are some internal proposals for solutions already - I'll dig them up and reach out to you. |
Rather than falling back to error message parsing (which is naturally brittle and would have to be replicated slightly differently across languages), I suggest we just expose the status code from any SDK error. All AWS SDKs should make this available as the fallback information to react to for unmodeled errors, e.g. the comment on Rust's Exact design to be bike-shedded, but as a strawperson proposal we could just add an additional |
I need to parse the string. Why can't we do both? |
@ajewellamz Has started this via #617 |
User Story
As a Smithy-Dafny customer I want
Smithy-Dafny to model access denied errors from AWS Services
so I can implement Dafny logic to handle
such access denied errors.
Current State
It appears that MOST access denied errors
from AWS Services are not formally modeled in
the Smithy Models that Crypto Tools and presumably other
Smithy-Dafny customers have been using
to model AWS Services such as KMS.
Thus, these access denied errors are turned into "opaque" objects.
Crypto Tools and other Smithy-Dafny customers
cannot process opaque errors in Dafny,
as they hold entirely generic/unspecified object:
This may be a Smithy flaw,
or a flaw in how AWS Smithy Models are processed by
Smithy-Dafny.
Partial Mitigations
At the very least,
representing the message/string component
of the access denied error,
along with the generic object,
would allow Smithy-Dafny customers to
execute string parsing in Dafny on the access denied error.
If we can differentiate between a truly opaque error
(i.e: any arbitrary exception thrown, such as Heap Exhaustion, or Kernel Panic)
and an access denied exception,
that is significant and possibly even sufficient
progress on this matter.
The text was updated successfully, but these errors were encountered: