at_lookup 4.0.0
at_lookup: ^4.0.0 copied to clipboard
A Dart library that contains the core commands that can be used with a secondary server (scan, update, lookup, llookup, plookup, etc.)
4.0.0 #
- docs: Upgrading to at_client 4.0 takes an app from at_client 3 to 4.
- breaking:
AtLookupImpl's constructor is internal to at_lookup; build a lookup withAtLookUp.withSecureSocketorwithTransport. - feat:
package:at_lookup/at_lookup_web.dartreaches an atServer from a browser:webSocketLookUps()finds it through the atDirectory over HTTPS and connects overwss://;fixedAddressWebSocketLookUps(host:, port:)connects every atSign to one atServer, for development. - feat:
AtLookUp.withTransportbuilds a lookup over any transport. - fix: a closed connection is replaced on the next command rather than written to. Over TLS, a close the atServer makes while notifications are paused is seen once they resume.
- fix: every command an authenticator sends goes on the connection its authentication began on.
- fix: stopping notifications while they are starting no longer closes a connection the lookup has since logged in on, so the next command needs no second login.
- fix: nothing else goes out on a connection until its
onConnecthas finished, and a connection whoseonConnectfails is closed, so the next call opens one and runsonConnectagain. - fix: in a browser, a connect to an atServer gives up after the network timeout, and closing a lookup stops a connect or atDirectory lookup still in progress.
- fix: an atDirectory answer longer than 512 bytes, or that is not a host name and a port, is refused, over TLS as in a browser, and over TLS the answer is read whole however it arrives. In a browser the atDirectory is asked for the atSign in its canonical form; over TLS an atSign holding a line feed is refused before any connection is made.
- fix: in a browser, an atServer address the WebSocket constructor refuses
fails with
SecondaryConnectException, as any other failure to connect does. - fix: a command holding a line feed before its end is refused, and none of
it is sent.
executeCommandthrowsIllegalArgumentException, andexecuteVerbanAtLookUpExceptionwith code AT0022, before the lookup finds, connects to or logs in to the atServer;AtCommandExecutor.sendSyncandAtConnection.writethrowIllegalArgumentException. - fix: a connection lost while authenticating is retried once on a fresh
connection; a second loss fails with
ConnectionInvalidException. - fix: a lost connection fails a verb with
AT0004, as other socket failures do. - fix: setting
authenticatortakes effect on the next command that needs authentication, which logs in again with it rather than running on the previous authenticator's login. - breaking:
AtLookUp.connectionis anAtConnection?. - breaking:
CacheableSecondaryAddressFinder,SecureSocketUtil,SecondaryUrlFinder,SecondaryAddressCacheEntryandAtLookupSecureSocketFactorynow come fromat_lookup_io.dart, notat_lookup.dart. - feat:
FixedSecondaryAddressFinderresolves every atSign to one fixed address. - breaking:
AtLookupImplrequiressecondaryAddressFinderandtransportFactory, and no longer takessecureSocketConfig— that now belongs to the transport factory.AtLookUp.withSecureSocketrequiressecondaryAddressFindertoo. Native callers can usesecureSocketLookUps()fromat_lookup_io.dartinstead. - breaking:
AtLookupImpl.findSecondaryis removed. Use aSecondaryAddressFinder. - breaking:
AtLookUp.withSecureSocket,withTransport,AtLookupImpl,secureSocketLookUps,webSocketLookUpsandAtLookUpFactorytake noclientConfig; give it to at_auth'sauthenticatorFor, which sends it infrom:. - breaking:
MonitorClientis removed. It has no replacement. - breaking:
AtLookupTransporttakes atransportFactory(anAtTransportFactory) in place ofsocketFactoryandsecureSocketConfig;secureSocketTransport(...)callers are unaffected. - breaking:
AtConnectionno longer exposes a socket.getSocket()is gone — read arriving bytes frominbound, write raw bytes withadd(List<int>), andwrite(String)returns aFuture. A connection is built over anAtTransport, which anAtTransportFactoryopens. - breaking:
AtLookupImpl'ssecureSocketFactoryis nowtransportFactoryand takes anAtTransportFactory;AtLookupSecureSocketListenerFactoryis nowAtLookupMessageListenerFactory. Anything constructing anOutboundConnectionImplitself changes with it, including code reachingsrc/connection/throughimplementation_imports. - breaking:
AtLookUp's credential-ladder members (atChops,enrollmentId,signingAlgoType,hashingAlgoType,authenticate_cram, andexecuteVerb'ssyncparam) are removed. A connection's authenticated enrollment isconnection?.getMetaData()?.authenticatedAsEnrollmentId. - breaking:
AtLookUp'supdate,lookup,plookup,llookup,deleteandscanare removed, withAtLookupMuxable.readResponse. Run a verb builder throughexecuteVerbinstead. - breaking:
cramAuthenticate,authenticate(privateKey)and theprivateKeyandcramSecretfields are removed. For CRAM, setauthenticatorto at_auth'sauthenticatorForCramSecret(...)and callpkamAuthenticate(). - breaking:
atLookupOverSecureSocketis removed. UseAtLookUp.withSecureSocketorsecureSocketLookUps()with an authenticator. - breaking: the
secondaryAddressFindersetter is removed; pass the finder when the lookup is built. - breaking:
pkamAuthenticatetakes noenrollmentId; the authenticator decides.authenticatedAsEnrollmentIdnames the enrollment the atServer accepted, after a reconnect too. - breaking: a failed write throws
AtIOExceptionon every transport; catch it where you caughtSocketException.executeVerbstill reports it asAT0004. - feat:
authenticatorandstop()are onAtLookUpitself, not only onAtLookupMuxable. - fix: a
startNotificationscalled while another is still starting joins it, so onemonitor:goes out however many callers ask; a start afterstopNotificationsbegins afresh. - fix: the commands a lookup logs carry
***in place of the passcode inotp:putand theotpanenroll:request carries. - build: no longer depends on
at_chops.
3.7.0 #
- feat:
AtLookUp.withSecureSocket(...)creates a lookup from anAtRootDomain, anauthenticatorand anAtLookupTransport, and returns anAtLookupMuxable.onConnectruns on each new connection before anything else can use it, for a proxy, and a connection whoseonConnectfails is closed. - feat:
AtLookupMuxablealso carries the atServer's notifications, throughnotifications,startNotificationsandstopNotifications;notificationConnectionUpsays whether that connection is up, anddropConnectioncloses it and leaves the lookup usable. - feat:
AtLookupMuxable.stop()ends a lookup for good: work in flight fails withStoppedException, and so does every later call.close()still closes the connection, and the next call reconnects. (3.7.0-rc2 to rc4 hadclose()end the lookup for good; that isstop()now.) - feat: an application can choose how a client's connections travel, through
AtLookUpFactory; the TLS default,secureSocketLookUps, is in the newpackage:at_lookup/at_lookup_io.dart, which re-exportsat_lookup.dart. - feat:
AtAuthenticatorandAtCommandExecutorlet a caller supply its own authentication. - feat:
checkAtSignServer(lookUp, atSign)reports whether an atSign is registered, whether its atServer answers and whether it is activated, with the cause of any failure. - feat: a connection's metadata records when it authenticated, and the enrollment id the lookup was asked to authenticate as.
- feat:
BaseConnection.inboundandBaseConnection.addread and write a connection's raw bytes. - feat:
validatedFromChallengeis public, so an authenticator built outside at_lookup refuses the samefrom:challenges. - feat: while notifications are on, each heartbeat the atServer answers logs
Heartbeat OK: lastReceipt <time of the last notification>at info. - fix: a request in flight when its connection closes fails at once, instead
of waiting for the response timeout:
executeCommandthrows aConnectionInvalidExceptionthat says so, andexecuteVerbanAtLookUpExceptioncarrying it. - fix: a TLS connect is bounded through the end of the handshake, so a peer that never finishes it no longer hangs the connect or keeps the process alive.
- fix: two authentications racing on one lookup no longer leave its verbs
refused as unauthenticated, and a command after
close()authenticates its new connection even when an authentication begun before finishes late. - fix: a refused CRAM authentication's exception carries the atServer's
response, and a response line starting
stream:is refused as unexpected (AT0014). - fix:
lookup(..., verifyData: true)returns the value only when its signature verifies against the sharer's public key. - fix: a command holding a line feed before its end is refused, and none of
it is sent.
executeCommandthrowsIllegalArgumentException, andexecuteVerbanAtLookUpExceptionwith code AT0022, before connecting or authenticating;sendSyncand a connection'swritethrowIllegalArgumentException. - perf: a response is read as soon as it arrives, rather than up to 10ms later.
- chore: opening and closing a connection log at finer rather than info.
- chore: a reply ends at its newline, as the atServer writes it, and a line that is no reply to anything closes the connection, so the next command opens a fresh one.
- chore: a read gives up after
AtNetworkTimeouts.defaultTimeout(30 s unless set) with nothing arriving, rather than 10 s; a whole reply still has 90 s. - chore:
SecureSocketUtil.createSecureSocketreturns at_lookup's ownSecureSocket:close()flushes and then closes both directions, andrenegotiate()throwsUnsupportedError. - deprecated, for removal in 4.0:
AtLookupImpl's constructor, in favour ofAtLookUp.withSecureSocket; the credential membersatChops,signingAlgoType,hashingAlgoTypeandenrollmentId, andAtLookupImpl'sprivateKeyandcramSecret, in favour of anAtAuthenticator;executeVerb'ssyncparameter, which was never read; andAtLookupMuxable.readResponse, whose only use was the stream verb. - deprecated, for removal in 4.0:
update,lookup,plookup,llookup,deleteandscan, in favour ofexecuteVerbwith the matching verb builder;cramAuthenticate, in favour of anAtAuthenticator;MonitorClient, in favour ofAtLookupMuxable's notifications; andAtConnection.getSocket(), in favour ofBaseConnection.inboundandadd. - deprecated, for removal in 4.0:
AtLookupImpl.authenticate,pkamAuthenticate'senrollmentId,AtLookupImpl.socketFactoryand settingsecondaryAddressFinderon a built lookup, in favour of what the lookup is built with; andAtLookupSecureSocketListenerFactory, renamedAtLookupMessageListenerFactoryin 4.0.0. - build: requires
at_chops^3.6.0 andat_commons^5.18.0.
3.6.1 #
- fix: strengthen the from challenge. A client now checks that a
from:challenge has the shape an atServer issues —_<uuid><atSign>:<uuid>, and that the atSign it names is the one this client asked for — before signing it. Defensive in anticipation of broader use of the APKAM keypair in future.
3.6.0 #
- feat:
CacheableSecondaryAddressFindertakes an optionalcacheDurationto override the default 1-hour cache TTL. - fix(deps): updated the
at_chopsconstraint to^3.3.0, the actual minimum this package compiles against. - refactor: route PKAM/CRAM signing + hashing through at_chops
(
PkamSigningAlgo/SHA512HashingAlgo);cryptonandcryptoare no longer imported anywhere in the package and have been dropped fromdependencies. Byte-identical by construction. - feat: bound network operations with a timeout so a dead network cannot hang
the SDK.
SecureSocketUtil.createSecureSocketnow accepts an optionaltimeout(and honoursSecureSocketConfig.connectTimeout), passing it toSecureSocket.connect.SecondaryAddressFinder.findSecondarytakes an optionaltimeoutthat bounds the entire atDirectory lookup — the retry loop and the previously-fixed 30-second response busy-wait — as a single deadline. Both default toAtNetworkTimeouts.effectiveDefault(30s) and are capped at 60s (#1909). Requiresat_commons ^5.13.0.
3.5.0 #
- chore(deps): at_chops ^3.0.0
3.4.1 #
- fix: revert breaking changes
3.4.0 #
- chore: clean up lint from new
strict_top_level_inferencerule - feat: AtLookupException non-nullable errorCode and errorMessage
3.3.0 #
- chore(deps): remove unused deps (path)
- chore(deps): at_commons ^5.5.0
3.2.0 #
- feat: add
SecureSocketConfig? configtoSecondaryUrlFinderconstructor - fix: make
SecureSocketConfig.tlsKeysSavePathoptional
3.1.0 #
- feat: add
OutboundConnection? connectionto theAtLookUpinterface
3.0.52 #
- fix: update exception and log messages to use standard terminology ('atServer' instead of 'secondary server', 'atDirectory' instead of 'root server')
3.0.51 #
- fix: potential bug handling atSigns which end in
datae.g.@foo_data
3.0.50 #
- fix: Flush socket after write and rethrow any exceptions occurred
3.0.49 #
- build[deps]: Upgraded the following packages:
- at_commons to v5.0.0
- at_utils to v3.0.19
- at_chops to v2.0.1
3.0.48 #
- feat: consume EnrollVerbBuilder in AtLookup.executeVerb()
- chore: upgrade at_commons to v4.1.1 and at_utils to v3.0.18
3.0.47 #
- fix: Fixed legacy error handling so error message isn't truncated if it contains a hyphen
3.0.46 #
- fix: Modify "executeCommand" to parse the error response from server and return appropriate exception
3.0.45 #
- build[deps]: Upgraded at_chops to v2.0.0
3.0.44 #
- build[deps]: Upgraded the following packages:
- at_commons to v4.0.0
- at_utils to v3.0.16
- at_chops to v1.0.7
3.0.43 #
- fix: revert removing private key reference from at_lookup_impl
3.0.42 #
- fix: more informative exception messages
- fix: removed private key reference from at_lookup_impl
3.0.41 #
- feat: introduce methods cramAuthenticate and close into the AtLookup interface
- deprecate: authenticate_cram() from AtLookupImpl. [cramAuthenticate should be used instead]
- build(deps): Upgrade at_commons to v3.0.57 and at_chops to v1.0.5
3.0.40 #
- feat: make
SecondaryUrlFinder(atServer address lookup) resilient to transient failures to reach an atDirectory - feat: made
retryDelaysMillisa public static variable inSecondaryUrlFinder; this allows clients to control- (1) how many retries are done and
- (2) the delay after each subsequent retry
3.0.39 #
- feat: Changes for apkam
- chore: Upgraded at_commons to 3.0.53 and at_utils to 3.0.15
3.0.38 #
- fix: wrap socket.listen in runZonedGuarded to ensure weird network errors are always caught
3.0.37 #
- fix: ensure outbound sockets are cleaned up properly
3.0.36 #
- feat: changes to call at_chops.sign() method which supports different signing algorithms.
- chore: upgrade at_commons to 3.0.43, at_utils to 3.0.12 and at_chops to 1.0.3
3.0.35 #
- fix: fallback code for backward compatibility if at_chops instance is not set
3.0.34 #
- feat: added new method pkamAuthenticate in at_lookup_impl which uses at_chops for pkam signing.
3.0.33 #
- fix: Removed race condition (related to management of outbound connection state after timeouts) which could in very rare circumstances cause unnecessary long delays
3.0.32 #
- feat: Upgrade at_commons for notifyFetch verb
3.0.31 #
- fix: tls keys are being dumped only by some secure socket connections when decryptPackets is set to true
- feat: tcpNoDelay set to true for all sockets
- fix: Dart analyzer issues
3.0.30 #
- Introduce clientConfig which can be used to send client configurations to server.
3.0.29 #
- Enhance the executeVerb to handle server responses in JSON format
3.0.28 #
- createConnection() now directly uses CacheableSecondaryAddressFinder which can be passed on as optional param
- Introducing SecureSocketUtil which [optionally] allows creation of secure sockets with security context
- Add mutex to PKAM and CRAM authentication
- AtCommons upgraded to latest version v3.0.20
3.0.27 #
- Improved timeout handling logic in outbound message listener
- Upgraded at_commons version to 3.0.19
3.0.26 #
- Update at_commons version 3.0.18 to display hidden keys in scan
3.0.25 #
- Update at_commons version 3.0.17 for AtException hierarchy
3.0.24 #
- Removed invalid line added to base_connection.dart
3.0.23 #
- Update at_commons version 3.0.16 for bypass cache feature
3.0.22 #
- find secondary bug fix
3.0.21 #
- Added CacheableSecondaryAddressFinder
3.0.20 #
- Update at_commons version
- Remove unnecessary print statement
3.0.19 #
- Export secondary address cache from the package
- Update at_commons and at_utils version
3.0.18 #
- Updated dependencies
3.0.17 #
- Added cache for secondary url lookup from root server
3.0.16 #
- Rename NotifyDelete to NotifyRemove
3.0.15 #
- Update at_commons version for Info and NoOp verb
- Update at_commons version for NotifyDelete verb
3.0.14 #
- Upgrade at_commons version for bug fix in notify verb syntax
3.0.13 #
- Upgrade at_commons version for shared key metadata support in notify
3.0.12 #
- Add encryption shared key and public key checksum of sharedWith atsign in metadata
3.0.11 #
- increase outbound connection timeout
3.0.10 #
- outbound listener bug fix
3.0.9 #
- at_commons version change for AtTimeoutException
- Handle error: responses from server
3.0.8 #
- at_lookup fix race condition when not using await with lookup requests
3.0.7 #
- at_utils version change for fix formatAtSign bug for null value
3.0.6 #
- at_commons and at_utils version change
3.0.5 #
- at_commons and at_utils version change
3.0.4 #
- at_utils and at_commons version change for AtKey validations.
3.0.3 #
- Reduce wait time on address lookup to root server
3.0.2 #
- Reduce wait time on server response
3.0.1 #
- connection close replaced with destroy
3.0.0 #
- Sync pagination feature
2.0.5 #
- bug fix for no verb response
2.0.4 #
- at_commons version change
2.0.3 #
- at_utils and at_commons version change for stream resume
2.0.2 #
- at_utils and at_commons version change
2.0.1 #
- at_utils and at_commons version change
2.0.0 #
- Null safety upgrade
1.0.0+8 #
- Refactor code with dart lint rules
- at_utils and at_commons version changes
1.0.0+7 #
- Third party package dependency upgrade
- Call back to auto restart monitor connection
1.0.0+6 #
- at_utils and at_commons version changes
1.0.0+5 #
- atsign validation changes
- at_utils and at_commons version changes
1.0.0+4 #
- at_utils and at_commons version changes
1.0.0+3 #
- public data signing, at_utils and at_commons version changes
1.0.0+2 #
- at_utils and at_commons version changes
1.0.0+1 #
- at_utils version changes
1.0.0 #
- Initial version, created by Stagehand